question

tonyye-4235 avatar image
0 Votes"
tonyye-4235 asked tonyye-4235 commented

Can wasapi record the loopback audio and exclude specify audio stream

I have one communication application, now I share my desktop and audio to other people.
I use wasapi to capture the system's audio, but the captured audio contains the mix of all audio being played, so it contains other people's voice too.
If I share this mixed audio to other people, he would get echo.
Is there any api to capture the mixed audio and exclude my application's audio?

windows-api-graphics-media
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

XiaopoYang-MSFT avatar image
0 Votes"
XiaopoYang-MSFT answered tonyye-4235 commented

Here is an example of loopback-mode audio capturing. It's also be a good idea to read Chrome source code directly if Chrome has a solution.

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The chrome source code is too complex, I still don't know it's solution even I have cost some hours on it.

0 Votes 0 ·

I have checked the HRESULT WASAPIAudioInputStream::InitializeAudioEngine() in chrome source code and It‘s almost the same as Capturing a Stream. And according to Loopback Recording,

WASAPI loopback contains the mix of all audio being played, regardless of the Terminal Services session the audio originated from. For example, you can run a loopback client in a service running in session 0 and capture audio from all user sessions, as well as audio being played from session 0.

Capturing all audio is a expected behavior, isn't It?

0 Votes 0 ·

The behavior isn't I except. I hope I can capture all audio stream except my application

0 Votes 0 ·
Show more comments