Created
May 8, 2011 21:28
-
-
Save jonocole/961702 to your computer and use it in GitHub Desktop.
BackMaskr
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 | |
if [[ $# == 0 ]]; then | |
echo $0 [mp3 filename] [header filename] | |
exit | |
fi | |
echo -n 'static char audiodata[] = {' > $2 | |
sox "$1" -t raw -r 8000 -c1 -s -2 - trim 0 10|xxd -i >> $2 | |
echo -n '}; char* fun(){ return audiodata; }' >> $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment