开发者

Is it possible to grab a pointer to the default audio endpoint device buffer in Windows 7?

开发者 https://www.devze.com 2023-04-10 02:37 出处:网络
Working with the Win32 API here. I\'ve been scouring through the MSDN documentation for the core audio services in Windows Vista+, and haven\'t had much luck finding a way to secure the default audio

Working with the Win32 API here. I've been scouring through the MSDN documentation for the core audio services in Windows Vista+, and haven't had much luck finding a way to secure the default audio buffer.

My goal is to set up a real-time spectrograph data of the audio being played. Is there any way to ac开发者_JS百科cess the audio stream before it is played through the speakers?

EDIT: I think I found the answer. Posted below.


Good News lads! I figured out a solution.

The WASAPI Loopback Recording mode, outlined here: http://msdn.microsoft.com/en-us/library/windows/desktop/dd316551(v=vs.85).aspx, lists in detail a way to "copy the output stream from the audio engine into an application's capture buffer". Its as close to a pointer of the audio output buffer as possible.

Therefore, technically it isn't possible to actually access the audio engine's buffer (in software at least), but you can read what's the Wave Out mix is.

Once I get this working, I'll post about any latency issues.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号