macoscore-audiosoxlibsox

Hog mode / Exclusive access to audio output device with SoX


I would like to know whether SoX/LibSoX offers the possibility to access a sound device in exclusive/hog mode. The idea is to prevent other applications from accessing the sound card / DAC that is being used by the focal app.

My main target is OSX CoreAudio output, but I am also eager to know about Linux (OSS/Alsa).

I know this is possible in CoreAudio, because I have seen it implemented in several apps, including this open source one.


Solution

  • On Mac OS X at least, the answer appears to be no. In http://sourceforge.net/p/sox/code/ci/master/tree/src/coreaudio.c SoX uses the default input or output device but there is no provision for hog mode.