For one of my course projects, I decided to make a network audio streaming server & client. Tired of low quality voice-chat, I decided to make something which delivers a lot better quality – i.e. 2ch 16bit wav. Obviously, this needs very high network bandwidth (~170KB/s per client).
For portability, I made it cross platform, and have tested it on Windows XP, Mac OSX, and Ubuntu 9.04. Some of the debugging text seems to be a bit buggy, but it otherwise works. It’s just a stand-alone commandline executable, so you’ll have to run it from the command prompt. (I can’t be bothered to build 3 different GUI front-ends for the different OSes, even though GTK is an option)
Here are pre-compiled binaries for AudioStreamer (Win32, Darwin). You can compile the program yourself by downloading the source code. AudioStreamer is licensed under the GNU GPLv3 license.
Here is the commandline usage:
usage: audiostreamer.exe <type> <port> <hostname> <type> specifies whether we are running as a server or client Values: 's' (server) or 'c' (client) <port> specifies the host/port to listen on (as server) or to connect to (as client) <hostname> specifies the host to connect to (as client). No effect as server
I made use of portaudio, libpthread (win32) for this project.
Audiostreamer will use your default input (For win32 – I haven’t implemented ASIO support yet, so it uses your WAVE input. For Mac OS, it should take your default CoreAudio input – I haven’t actually tested audio input on Mac OS)
Audio is streamed through the TCP port of your choosing. You NEED a fast network connection for this, or you may experience buffer underruns. Make sure you forward your port if needed (through your firewall/router)