0
0

Hi,

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.

[code:1xaw0rij]
var spek : single;

[..]

fmod_channel_getspectrum (channel,spek,512,0,FMOD_DSP_FFT_WINDOW_RECT);
[/code:1xaw0rij]

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

  • You must to post comments
0
0

[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:

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

Thanks for helping,
styxxx

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.