hey i have a problem using FSOUND_DSP_GetSpectrum(), it always returns a float whose value is 0.
this is how i load the file:
if( FSOUND_Init ( 44100, 32, 0 ) )
c_Stream = FSOUND_Stream_Open ( filename, FSOUND_MPEGACCURATE, 0, 0 );
if ( c_Stream != NULL )
FSOUND_Stream_Play ( FSOUND_FREE, c_Stream );
FSOUND_DSP_SetActive( FSOUND_DSP_GetFFTUnit(), TRUE );
Then i use this to read it every frame:
spectrum = FSOUND_DSP_GetSpectrum();
spectrum is always 0.0f. i tried everything and its not working at all. thanks in advance, id be glad if you could help me out.
It usually doesnt show up as an array if u use * just go through the data as u would in a normal array.
for(int i=0; i < 256; i++)
float data = spectrum[i];
Use 256 as i think the size of the array is 255
- nstayte answered 13 years ago
umm its an mp3 file. it loads and plays fine, etc. I looked at the whole array. Im using MSVC++ .NET if that makes a diffrence. I don’t even think its an array, because in the debugger watch it shows it as 0.00000000 too, and not an array.
Please login first to submit.