Hi guys,
Got some problems here.

I managed to make a simple real-time spectrum analysis tool which I will use later in my projects. Per se it isn’t possible with FMOD (as far as I’m convinced) to do this stuff in real-time so I made a loop in which sound buffer is created, stereo mix is recorded and than after a little delay silently played. Till that moment everything works fine.

But I’ve noticed that when i call:
channel->getSpectrum(specL, sampleSize, 0, FMOD_DSP_FFT_WINDOW_RECT);
channel->getSpectrum(specR, sampleSize, 1, FMOD_DSP_FFT_WINDOW_RECT);
specL, which is a size of sample size array made of floats, which corresponds to channel 0, is always empty while channel 1 is working fine. And yes, I’ve declared the usage of 2 channels in FMOD_CREATESOUNDEXINFO.

The second problem is that the sample size variable must be set to at least 4096 in order to capture any spectrum from recorded buffer. When it’s set to less than that value, it seems to be empty. 8192 works ‘fine’ except that measurements are very inaccurate (frequency visualisation that I’ve made shows strange readings).

I’ve checked my code on two PC’s and on both it looks the same.
Could you tell me what may be wrong?

PS Code, program and libraries: https://www.dropbox.com/sh/l4pr2am2hzs25vg/2XdmjjEl8j

PS2 It’s quite strange that volumes of captured frequencies are so low (they won’t go above 0,01f). Look at http://screenshooter.net/1317378/jpyress and http://screenshooter.net/1317378/fciidja – In Windows and AIMP, VU bars are fine while my program is acting just uninteligible.


  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.