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
- reixons asked 6 years ago
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.
- Guest answered 6 years ago
Please login first to submit.