recording desktop audio

laralove 21 Reputation points
2022-03-24T20:27:55.79+00:00

im working on an application to stream whatever the user is hearing to my server, which is then routed to the call they're in, its kind of like screen recording but only for audio

im not talking about microphone recording, im talking about recording the sounds applications make, preferably it should be possible to filter applications to eliminate echoing

do you think it's possible without hacky things like virtual mics? thanks for all the help! and im all new to wasapi though i've been meaning to get into windows development for a while!

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,523 questions
0 comments No comments
{count} votes

Accepted answer
  1. Xiaopo Yang - MSFT 12,231 Reputation points Microsoft Vendor
    2022-03-25T01:40:56.577+00:00

    Application loopback API Capture Sample which demonstrates the use of ActivateAudioInterfaceAsync Win32 API with a new initialization structure can restrict captured audio data to that rendered by a specific process and any of its child processes.


1 additional answer

Sort by: Most helpful
  1. Castorix31 83,206 Reputation points
    2022-03-24T20:43:41.497+00:00

    If I adapt the MS code from Capturing a Stream
    by using :

    hr = pEnumerator->GetDefaultAudioEndpoint(		  
    	  	eRender, eConsole, &pDevice);  
    

    I capture all output audio (like MP3, Youtube videos, etc...)