Skip to content

Instantly share code, notes, and snippets.

@shmerl
Last active April 30, 2022 05:49
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shmerl/2cec6273ba25dd1486dd to your computer and use it in GitHub Desktop.
Save shmerl/2cec6273ba25dd1486dd to your computer and use it in GitHub Desktop.
#!/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