Last active
April 30, 2022 05:49
-
-
Save shmerl/2cec6273ba25dd1486dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run from location where you have audio | |
# from the <game-dir>/streammusic directory | |
mp3s=( | |
[0-5]*.wav | |
mus_{a,b,t}*.wav | |
evil_ending.wav | |
credits.wav | |
) | |
wavs=( | |
al_*.wav | |
mus_loadscreen.wav | |
) | |
mkdir -p fixed | |
for src in ${mp3s[@]}; do | |
target="fixed/${src%%.*}.mp3" | |
echo "fixing ${src} -> ${target}" | |
dd if=${src} of=${target} ibs=1 skip=58 obs=10M | |
done | |
for src in ${wavs[@]}; do | |
target="fixed/${src}" | |
echo "fixing ${src} -> ${target}" | |
dd if=${src} of=${target} ibs=1 skip=470 obs=10M | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment