Brandon Rozek
b2dbe95d2f
Added the start script which controls the flow of the server application. Still need to add functionality to listen to audio in the client side. They will need to listen to serverip:6003
24 lines
404 B
Bash
Executable file
24 lines
404 B
Bash
Executable file
#!/bin/bash
|
|
compress=1
|
|
|
|
function cleanup() {
|
|
echo "Shutting Down"
|
|
rm ./raw_audio_pipe
|
|
kill $child_pid
|
|
}
|
|
|
|
mkfifo ./raw_audio_pipe
|
|
|
|
# Run Radio Server Program in Background
|
|
./tuner.py &
|
|
child_pid=$!
|
|
|
|
if [ $compress -eq 1 ]
|
|
then
|
|
ffmpeg -f f32le -ar 48k -ac 1 -i pipe:0 -f ogg -ab 32k pipe:1 < ./raw_audio_pipe | nc -kl 127.0.0.1 6003
|
|
|
|
else
|
|
tail -f raw_audio_pipe | nc -kl 127.0.0.1 6003
|
|
fi
|
|
|
|
cleanup
|