是否可以从另一个进程捕获渲染音频会话? [英] Is it possible to capture the rendering audio session from another process?

查看:137
本文介绍了是否可以从另一个进程捕获渲染音频会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将第一次进入Windows的WASAPI系统,我不知道使用Windows API是否可以实现我想要的东西.

我正在尝试编写一个程序,该程序将记录来自各种程序的声音,并将其分解为单独的已记录音轨/音频文件.通过重新学习,我知道我需要记录的单元是各种 IAudioSessionControl ,这并没有为我提供获取会话流副本的方法.

我是否缺少使我可以使用WASAPI(或某些其他Windows API)执行此操作并在将单个会话(或单个流)混合在一起以形成端点之前获得单个会话(或单个流)的目的,或者这是不可能实现的目标吗?

解决方案

混合发生在API(WASAPI)内部,您无权访问其他音频客户端的缓冲区,尤其是.首先,它们在当前流程的上下文中不存在.也许最好的方法(不是很好,但是没有更好的替代方法)是,如果有问题的任务允许这样的肮脏技巧,则钩住API调用并截取通往WASAPI的数据.

I am taking my first dives in to the WASAPI system of windows and I do not know if what I want is even possible with the windows API.

I am attempting to write program that will record the sound from various programs and break each in to a separate recorded track/audio file. From the reseacrch I have done I know the unit I need to record is the various audio sessions being rendered to a endpoint, and the normal way of recording is by taking the render endpoint and performing a loopback. However from what I have read so far in the MSDN the only interaction with sessions I can do is through IAudioSessionControl and that does not provide me with a way to get a copy of the stream for the session.

Am I missing something that would allow me to do this with the WASAPI (or some other windows API) and get the individual sessions (or individual streams) before they are mixed together to form the endpoint or is this a imposable goal?

解决方案

The mixing takes place inside the API (WASAPI) and you don't have access to buffers of other audio clients, esp. that they don't exist in the context of the current process in first place. Perhaps one's best (not so good, but there are no better alternatives) way would be to hook the API calls and intercept data on its way to WASAPI, if the task in question permits dirty tricks like this.

这篇关于是否可以从另一个进程捕获渲染音频会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆