开发者

How to get sound data from all sounds you play at the smae time? (actionscript flash)

开发者 https://www.devze.com 2022-12-27 21:13 出处:网络
So If I play one sound I use sound = new Sound();开发者_JAVA百科 ... sound.addEventListener( SampleDataEvent.SAMPLE_DATA, onSampleData);

So If I play one sound I use

sound = new Sound();开发者_JAVA百科 ...
sound.addEventListener( SampleDataEvent.SAMPLE_DATA, onSampleData);
sound.play();

And so I'll get data, but If I have 20 sounds playing and I want to get data from the sound I here as a resalt of data mix of all that sounds... How to get it?


You can use SoundMixer.computeSpectrum(). It won't fire an event during each sample, but it will create a ByteArray with all the sound data mixed together. You can then manipulate that data.

0

精彩评论

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