开发者

SoundMixer.computeSpectrum with microphone

Flex has the SoundMixer.computeSpectrum function that lets you compute an FFT from the currently playing sound. What I'd like to do is compute an 开发者_运维百科FFT without playing the sound. Since Flash 10.1 lets us access the microphone bytes directly, it seems like we should be able to compute the FFT directly off of what the user is speaking.


Unfortunately this doesn't work as far as I know. As stated on the Adobe help pages:

The SoundMixer.computeSpectrum() method lets an application read the raw sound data for the waveform that is currently being played. If more than one SoundChannel object is currently playing the SoundMixer.computeSpectrum() method shows the combined sound data of every SoundChannel object mixed together.

This implies two drawbacks:

  1. It just works on the output (SoundChannel)
  2. It just works on the mix of all outputs.

If you don't need the output channel at all, you may turn down it's volume to zero or near to zero!? Don't know if that could work.

For myself I don't see any other chance at the moment to implement the FFT on my own to compute a spectrum on the microphone data.


I'm not sure if there's a way to pass that data, but if all else fails, you can always compute the FFT yourself.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜