Flash 和音频挂钩
我正在尝试捕获 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我真的很惊讶几个 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...