Access to sound playing back through soundcard

Hi,
I’m trying to setup an app which analyses an audio buffer in realtime using the ofxAubio addon.
I can play back a sound file (loaded from my PC) or have direct access to the microphone audioIn buffer using ofSoundStream but that’s not what I want…

What I want is to be able to inspect the sound data going through my soundcard - so if I’m playing back audio via a 3rd party app , web browser, audio player etc I can hook directly into that.

Does anyone know if that’s possible?

I would have thought it would happen in the audioOut buffer after setting up and starting an ofSoundStream instance but I can’t seem to tap directly into the audio playing through my system - only the microphone.

Any ideas ??

Thanks

One solution is to use something like sound siphon (https://staticz.com/soundsiphon/) or audio hijack (https://rogueamoeba.com/audiohijack/). For sure there is something more elegant, but these will work. I have used sound siphon a bit. I have also used this for windows https://www.vb-audio.com/Cable/index.htm

Alternately you could use two soundcards and set one as the system out and one for your of app and use a cable to get the sound from one to another.

If you need to deploy your app across different hardware it is possible with port audio apparently:

1 Like

Thanks fresla!
I’m on Windows so used vb-audio. It works a treat :slight_smile:

Cheers for that