Flash 和音频挂钩

发布于 2024-10-26 02:15:05 字数 467 浏览 4 评论 0原文

我正在尝试捕获 activeX flash 组件正在播放的音频。

我通过找到 flash.ocx 模块并挂钩 waveOutWrite 函数来实现此目的

这似乎工作得很好,但是我无法区分内部调用 waveOutWrite 的不同 activex 实例,因为音频似乎来自同一线程并针对同一输出设备。

我的问题是如何区分谁在呼叫 waveOutWrite?

我认为答案在于为每个 activex 实例加载 flash.ocx 实例,但不知道如何实现这一点,因为模块加载是由 COM 自动处理的。我的一个想法是在不同的进程中创建 activex 组件,这有望导致从不同的线程调用 waveOutWrite 函数。然而,这似乎是实现这一目标的一种相当复杂的方法。

有什么想法吗?

I'm trying to capture the audio which an activeX flash component is playing.

I do this by finding the flash.ocx module and hook the waveOutWrite function.

This seems to work well, however I cannot differentiate between different activex instances which call waveOutWrite internally as the audio seems to come from the same thread and target the same output device.

My question is how I could differentiate between who is calling waveOutWrite?

I think the answer lies in somewhere in loading a flash.ocx instance for each activex instance, not sure how to achieve that though as the module loading is handled automatically by COM. One idea I had was to create the activex components in different processes, which hopefully would cause the waveOutWrite function to be called from different threads. However, this seems to be a rather complicated way to achieve this.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷路的信 2024-11-02 02:15:05

我真的很惊讶几个 OCX 实例共享同一个线程。我可以发誓他们得到的是独一无二的。因此我之前的[已删除]答案。

请问:为什么要同时播放多个声音?这绝对有必要吗?或者,如果其他 OCX 实例正在播放“静音”声音,您可以通过查看波形缓冲区来识别它们。或者可能是 WAVEHDR 结构中的其他数据,也许是 dwUser...

I am really surprised that several OCX instances share the same thread. I could have sworn that they get unique ones. Hence my previous [deleted] answer.

May I ask: why are you playing several sounds at once? Is that absolutely necessary? Or, if the other OCX instances are playing "mute" sound, you could identify them by looking into the waveform buffer. Or possibly, other data in the WAVEHDR struct, perhaps dwUser...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文