recording desktop audio

laralove 21 Reputation points

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,452 questions
0 comments No comments
{count} votes

Accepted answer
  1. Xiaopo Yang - MSFT 11,581 Reputation points Microsoft Vendor

    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 82,126 Reputation points

    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...)