Here's a command to set up a quick and dirty listener on port 20000. Note that I've changed the source code for c2dec so that it inputs from stdin and outputs to stdout. 'pacat' is the pulseaudio cat command that pipes sound into the pulseaudio system.
ncat -l -k 20000 | /home/brucerob/Codec2/codec2/src/c2dec | pacat --channels=1 --rate 8000ncat likes to die when it has dealt with a single transfer, so we use the -k command to 'keep' it alive.
What about the source side of our network? We just pipe c2-encoded data into a netcat command, like this:
pacat -r --rate=8000 --format=s16le --channels=1 | ./c2enc | netcat localhost 20000Again, the c2enc command has been altered to do the right thing.
The result is pretty good, but with about 12 seconds of lag. Some buffers are taking their time getting filled, and I'll have to look into that.