none
Hook audio buffers of Windows application individually RRS feed

  • Question

  • Hi,

    I've heard that later Windows version officially provide Audio hook and Mixer APIs.

    So, I'd like to know which are Windows APIs that allow me to capture the audio of applications individually?

    As an exemple, I'd like to capture only the audio that is playing back by any application running (e.g: a game, a web browser, a player).  

    Thanks,

    Daniel F.

    Saturday, January 6, 2018 11:33 PM

All replies

  • You can capture audio with IAudioClient, IAudioCaptureClient

    I included the MSDN code sample Capturing a Stream in a Win32 app and it works fine on Windows 10


    Sunday, January 7, 2018 12:15 AM
  • You heard incorrectly - as with previous versions of Windows (starting with Windows Vista), you can record from the microphone, or you can record the audio output going to the speaker, but there is no API to record the output of an individual application.

    If you would like such an API, please submit a feature suggestion in Feedback Hub under Devices and Drivers / Audio and sound

    https://blogs.msdn.microsoft.com/matthew_van_eerde/2016/09/26/report-problems-with-logs-and-suggest-features-with-the-feedback-hub/


    Matthew van Eerde

    Sunday, January 7, 2018 6:35 PM
    Moderator
  • Hi  Daniel F,

    Thank you for posting MSDN here.

    I am not sure whether your project is UWP or Win32 type.

    If your project is UWP, you could consult the UWP forum, according to my search, the UWP provide relevant API about audio and video, which can capture, play back, or edit photos, videos, or audio.  Here is a document, you can see it.

    https://docs.microsoft.com/en-us/windows/uwp/audio-video-camera/

    If your project is win32, the document provides the functions , structures, and messages associated with audio mixers.

    The Microsoft company also provides information about Core Audio APIs for the Microsoft Windows family of operating systems.

    Best Regards,

    Hart


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, January 8, 2018 2:33 AM
  • In the code sample is said that audio stream is recorded from the default audio capture device

    So, using that code sample how can I access the application buffer as shonwed in the picture bellow?

       

    Monday, February 26, 2018 3:35 PM
  • You can't. See my other response.

    Matthew van Eerde

    Monday, February 26, 2018 4:50 PM
    Moderator
  • In the code sample is said that audio stream is recorded from the default audio capture device

    So, using that code sample how can I access the application buffer as shonwed in the picture bellow?

      

    In my test, I replaced eCapture by eRender to capture any application sounds


    • Edited by Castorix31 Monday, February 26, 2018 5:21 PM
    Monday, February 26, 2018 5:21 PM
  • How did Discord manage to add per app sound to their screen share?
    Tuesday, May 14, 2019 2:25 PM
  • Beats me. Ask them.

    Matthew van Eerde

    Tuesday, May 14, 2019 2:54 PM
    Moderator
  • There's no way to ask them
    Tuesday, May 14, 2019 3:25 PM
  • https://discordapp.com/ > Support > Help & Support seems like a good start.

    Matthew van Eerde

    Tuesday, May 14, 2019 3:27 PM
    Moderator
  • I emailed them and they replied 3 days later saying that its closed source and we cant tell you :/ rip
    Friday, May 17, 2019 7:48 AM
  • D'oh


    Matthew van Eerde

    Friday, May 17, 2019 3:19 PM
    Moderator