开发者

Flash and Audio Hooking

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开发者_JAVA百科 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?


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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜