filenames end in raw, and finish audio convert script

This commit is contained in:
Donald Burr 2015-02-18 01:26:10 -08:00
parent 01f8beea54
commit a5871e107a
2 changed files with 7 additions and 1 deletions

View file

@ -118,6 +118,7 @@ struct sockin {
} }
}; };
char fnbuf[80];
struct audio_sockin : public sockin { struct audio_sockin : public sockin {
int leftover; int leftover;
int a_fd; int a_fd;
@ -132,7 +133,8 @@ struct audio_sockin : public sockin {
a_fd = -1; a_fd = -1;
if (f_saveaudio) { if (f_saveaudio) {
a_fd = open(names[id], O_WRONLY | O_APPEND | O_CREAT, S_IRWXU | S_IROTH); sprintf(fnbuf, "%s.raw", names[id]);
a_fd = open(fnbuf, O_WRONLY | O_APPEND | O_CREAT, S_IRWXU | S_IROTH);
} }
} }

4
acatcher/aconvert Normal file → Executable file
View file

@ -1,2 +1,6 @@
#!/bin/sh #!/bin/sh
# Signed 16 bit Little Endian, Rate 22050 Hz, Mono # Signed 16 bit Little Endian, Rate 22050 Hz, Mono
INFILE="$1"
OUTFILE="$INFILE.wav"
#sox -r 44100 -e unsigned -b 8 -c 1 <RAW_FILE> <TARGET_FILE>
sox -r 22050 -e signed -b 16 -L -c 1 "$1" "$OUTFILE"