Since there is no equivilent to /dev/dsp or /dev/audio on OSX, you need to install an alternative like sox. Install sox by either downloading the OSX binary from http://sox.sourceforge.net/ or install homebrew, and then install sox with brew install sox Examples cat audio from /dev/urandom/ : cat /dev/urandom | sox -traw -r44100 -b16 -u - -tcoreaudio audio from an executable cat > test.c main(t) {