Hello fellow programmers :), I’m very new to fmod and sound related programming in general, I’m working on a small openGL demo and i want to sync some effects with the music I’ll be playing. The problem is that my code doesn’t work properly :(.
Here’s the visualization of the spectrum:
Here’s all the fmod related code i use:
FMOD_System_Init(fmod_system, 16, 0, NULL);
FMOD_System_CreateSound(fmod_system, "music.mp3", FMOD_2D, NULL, &music);
//called everytime i visualize the spectrum
FMOD_System_GetSpectrum(fmod_system, spectrum, 512, 0, FMOD_DSP_FFT_WINDOW_TRIANGLE);
Where spectrum is an float array of size 512.
The sound plays but FMOD_System_GetSpectrum returns 0 for some reason.
- Albin Engström asked 9 years ago
The array contains float values, in the picture i posted before the green lines represents different parts of the spectrum which has a size of 512. as you can see the spectrum takes a form, but the form does not change even if i try to update it.. the float array is cleaned before i use it… (the music is playing)
Please login first to submit.