0
0

Hi everybody!! I am looking for a function to read data without playing the song.
While the MP3 song is playing I get the data from the channelGroup->getSpectrum() function. I want to do get the same results but from an specific point of the song and without playing it. How could I do it?

I have seen that there is a way sound->readData((char *)data, CHUNKSIZE, &read);
But I don’t really understand if it gives me the data in the same way as getSpectrum() does.

Thanks in advance

  • You must to post comments
0
0

Hi reixons,

The difference is readData() returns sound data, getSpectrum() returns frequency data. The equivalent to readData would be getWaveData. There is no inbuilt mechanism in FMOD to get frequency data from a sound that is not playing, however you can derive the frequncy data from the sound data using a furrier transform. There are plenty of open source FFT (fast furrier transfrom) implementations out there. That is the only way to get the spectrum of a sound that is not playing.

  • You must to post comments
0
0

Could somebody at least tell me what’s the difference between the data format you get using getSpectrum() and the one you get with readData()… Thanks

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.