如何使用DSPACK将自定义音频缓冲区注入DirectX过滤图中? [英] How do I inject custom audio buffers into a DirectX filter graph using DSPACK?

查看:80
本文介绍了如何使用DSPACK将自定义音频缓冲区注入DirectX过滤图中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有DSPACK的Delphi 6进行涉及音频和DirectX的多种操作.我有一个输入"端,可以在其中将一个枚举的音频输入设备分配给一个TFilter对象,并将该滤波器连接到TSampleGrabber对象,这为我提供了将音频发送到Skype所需的音频缓冲区.我需要弄清楚该图的逻辑逆.我通过套接字从Skype接收音频缓冲区.我需要创建一个具有过滤器的图形,该过滤器将成为TSampleGrabber的补充.换句话说,一个TFilter不是在TSampleGrabber可用时触发新音频时触发音频事件,而是在需要新音频来馈入图形时触发音频事件.在输出"图的末尾是一个TFilter,该TFilter分配给枚举的音频输出设备之一,其输入引脚将连接到此TSampleGrabber反向doppelganger的输出引脚.

I am using Delphi 6 with DSPACK to do several operations involving audio and DirectX. I have the "input" side figured out where I assign one of the enumerated audio input devices to a TFilter object and connect that filter to a TSampleGrabber object and that gives me the audio buffers I need to send audio to Skype. It is the logical inverse of that graph that I need to figure out. I receive audio buffers from Skype via a socket. I need to create a graph that has a filter that would be the complement to TSampleGrabber. In other words, a TFilter that instead of delivering audio buffers during an event that fires when new audio is available like TSampleGrabber does, would have a similar event that fires when new audio is necessary to feed the graph. At the tail end of this "output" graph would be a TFilter assigned to one of the enumerated audio output devices whose input pins would connect to the output pins of this TSampleGrabber inverse doppelganger.

有人知道该怎么做吗?我当然希望避免编写自己的自定义筛选器COM对象来完成此操作.我希望现有的TFilter可以接受将自定义音频缓冲区混合到DirectX过滤器图中.

Does anyone know how to do this? I of course would prefer to avoid writing a custom filter COM object of my own to get this done. I'm hoping that there is an existing TFilter that accepts custom audio buffers to be mixed into a DirectX filter graph.

推荐答案

数据注入筛选器的常见起点是

A common starting point for a data injection filter is Push Source Filters Sample. This creates a filter with output only pin, which injects data into DirectShow pipeline, data can be of any type and typically it is video or audio.

正如您提到的Delphi和DSPack一样,后者已移植了该示例(请参见\ Demos \ D6-D7 \ Filters \ PushSource).

As you mentioned Delphi and DSPack, the latter has this sample ported (see \Demos\D6-D7\Filters\PushSource).

这篇关于如何使用DSPACK将自定义音频缓冲区注入DirectX过滤图中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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