when calling the getspectrum-function my program crashes with some access vialoation warning (ist doesn’t crash when using FMOD_HARDWARE instead of FM_SOFTWARE, but of course there aren’t any spectrum values). Doesn’t matter if die channel is paused or not. Everything else works fine.

var spek : single;


fmod_channel_getspectrum (channel,spek,512,0,FMOD_DSP_FFT_WINDOW_RECT);

Maybe I’m just stupid, but I didn’t figure out, what’s wrong…

  • You must to post comments

[quote="brett":oky26eo2]you are passing 1 single when it expects 512? You have a memory overwrite crash because you are not passing in enough memory.[/quote:oky26eo2]

Ok, think, i solved it. Problem was, that when trying to pass an array i got a compiler error. But it seems to work that way:

var speks : array [1..512] of single;
Fmod_channel_getspectrum (channel,speks[1],512,0,FMOD_DSP_FFT_WINDOW_RECT);
Just adding “[1]”.. 😉

Thanks for helping,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.