0
0

Hi ! I used GetSpectrum with the previous version of fmod and it worked well, but now i cant figure why it doesn’t want to do the same !
Here is a bit of my code :
[code:velgzgop]FMOD_SYSTEM *sys;
FMOD_SOUND *stream;
FMOD_CHANNEL *channel=0;
char *song="music.mp3";
float *spectrum_buffer_ptr;
spectrum_buffer_ptr = (float *) calloc(512, sizeof(float));
int playing=0;

FMOD_System_Create(&sys);
FMOD_System_Init(sys,32,16,FMOD_INIT_NORMAL,NULL);
FMOD_System_CreateSound(sys,song,FMOD_SOFTWARE,0,&stream);
FMOD_System_PlaySound(sys, FMOD_CHANNEL_FREE, stream, 0, &channel);
do
{
FMOD_Channel_GetSpectrum(channel,spectrum_buffer_ptr,512,0,FMOD_DSP_FFT_WINDOW_RECT);
...
...
FMOD_Channel_IsPlaying(channel,&playing);
} while(playing || !kbhit());
[/code:velgzgop]
I think it’s enough for you to understand.
The error i get is ‘exeception on floating point’ at the ‘GetSpectrum line’. I get it just after a few moment my song started.
Thanx to helping me.

  • You must to post comments
0
0

Can’t help you, sorry. But I am using Visiul Basic Pro 6 and I can only get the first number in the correct range, all other numbers are in the E-12 range.

Mike

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.