Last active
November 10, 2024 12:06
-
-
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 |
Indeed, I was confronted yesterday with this problem. You can take this code and put it somewhere for future kotor fans. I don't know github so well. Or just leave it as a coment.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice, that would be useful for those who don't have bash on Windows set up.