Question

I am trying to build what I think is a basic app. Well, two apps one for windows and one for OS X. I would like to capture the audio signal that is playing (ie if the user is playing music out his/her speakers). Then take that signal and stream it out so another computer can "listen". The other computer would be Windows or OS X.

  1. Any ideas on how to get the audio signal?
  2. What's the most efficient way to stream out audio without a 3rd party plugin? If there is an open-source solution out there, I would be interested.

Thanks!

Chris

Was it helpful?

Solution

On Windows XP this isn't trivial at all because there's no way of intercepting the output signal without writing an audio filter driver (which is not somethign for the faint of heart).

On Windows Vista and above, you can capture the output of the audio engine by using the WASAPI APIs (built into Windows so they're free) and initializing an audio client with the AUDCLNT_STREAMFLAGS_LOOPBACK flag. This will give you a capture stream that's hooked to the output of the audio engine.

You can then package up that audio and send it to the other machine and render it with whatever audio rendering API you want.

I don't know how to do the equivilant on OSX though :(.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top