Capture audio of a single application on Windows 7

江枫思渺然 提交于 2019-11-26 21:23:14

问题


Is there a way to capture the audio outputted by only a single application, and not the system as a whole? With WASAPI I can capture the entire system audio, but I wish to only capture the audio from one application (there will be many applications, all playing audio at once.)


回答1:


Detours is used for hooking. Using the lib to hook IAudioRenderClient interface, including GetBuffer and ReleaseBuffer, and read data from the buffer.




回答2:


Depending on the APIs used by the application to play the audio, you could write an AppInit DLL that will wrap the built-in waveIn\waveOut functions and would pass along the audio data. I know this works with the waveIn\waveOut functions, but not sure what other audio playback interfaces there are on Windows 7 and whether they are compatible with the AppInit trick.



来源:https://stackoverflow.com/questions/6084550/capture-audio-of-a-single-application-on-windows-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!