Discussion:
Listening to an OUTPUT DEVICE
(too old to reply)
Tim Vancauwenbergh
2018-09-05 18:52:22 UTC
Permalink
Hello

I am currently in the progress of using portaudio to analyse the audio output (spectrum analysis) and sending it to an arduino which will put data on an RGB led strip.
I have to listen to an output device in order to analyse the audio I am playing on my pc.

Example:

* Playing music on youtube which can be heard trough the speakers of the laptop
* I can’t use the microphone because the output sound will change when both microphone and speakers are active at the same time...


The question is: How can I listen to an output device? I found out how to use the microphone but it is listed as input device.

I am using Visual Studio 2015 for programming in c.

Kind regards,

Tim Vancauwenbergh
sqweek
2018-09-08 14:39:41 UTC
Permalink
On Thu, 6 Sep 2018 at 02:52, Tim Vancauwenbergh <
The question is: *How can I listen to an output device?* I found out how
to use the microphone but it is listed as input device.
AFAIK, whether this is actually possible depends on the underlying system.
I assume you're on windows since you mentioned visual studio -- back in the
days of windows 95/98/xp there was basically always a "Stereo Mix" device
available, which you could listen to to capture sound that was going to the
speakers. These days, unfortunately, this device is not as common and I
think it depends on the underlying driver as to whether it's available at
all. Sometimes it just needs to be manually enabled, eg. via something like
https://www.howtogeek.com/howto/39532/how-to-enable-stereo-mix-in-windows-7-to-record-audio/

There's nothing you can do within portaudio itself to capture what is going
to the speakers, unless the system provides such a device. Hope that gives
you some leads.

-sqweek
Richard Ash
2018-09-10 19:03:45 UTC
Permalink
On Sat, 8 Sep 2018 22:39:41 +0800
Post by sqweek
There's nothing you can do within portaudio itself to capture what is
going to the speakers, unless the system provides such a device. Hope
that gives you some leads.
The version of PortAudio in the Audacity git repo has some code which
uses WASPI to provide a "record" device for each output device on the
system, as well as each input. This works by traversing the WASPI node
graph (which wasn't especially fun ...) but does seem to work for a lot
of people these days - or at least we don't get too many complaints
about it!

The only obstacle I know of to getting it upstream is that it's on top
of a fairly old version of Portaudio, and it's original author isn't
around any more.

Richard

Phil Burk
2018-09-08 22:34:30 UTC
Permalink
Hello,

Capturing audio output from other apps is generally not supported because
of security concerns. One might monitor VoIP calls for example.

But each platform usually allows some way to do this. On Mac there is
SoundFlower:

https://github.com/mattingalls/Soundflower/releases/

It should appear as an audio device to PortAudio.

Phil Burk



On Wed, Sep 5, 2018 at 11:52 AM Tim Vancauwenbergh <
Post by Tim Vancauwenbergh
Hello
I am currently in the progress of using portaudio to analyse the audio
output (spectrum analysis) and sending it to an arduino which will put data
on an RGB led strip.
I have to listen to an output device in order to analyse the audio I am playing on my pc.
- Playing music on youtube which can be heard trough the speakers of
the laptop
- I can’t use the microphone because the output sound will change
when both microphone and speakers are active at the same time...
The question is: *How can I listen to an output device?* I found out how
to use the microphone but it is listed as input device.
I am using Visual Studio 2015 for programming in c.
Kind regards,
Tim Vancauwenbergh
_______________________________________________
Portaudio mailing list
https://lists.columbia.edu/mailman/listinfo/portaudio
Loading...