I just got started with FMOD and I’m trying to render out the waveform overview.
Basically I’m developing my own timeline with keyframes and I’d like to be able to load a track and visualize the waveform as a reference to sequence other modules, nothing too fancy.

At the moment I can read the pcm data using readData, however I’m not sure how to process the pcm data to get a preview that makes sense. I was also wondering if FMOD provides a method to calculate the mean for each block, I was thinking to get N samples and plot the mean, but again I’m not sure this is the way to go, I guess the first question should be, what kind of data do I want to render as the wave form, is it the mean, the average volume, or what?

I also need some clarifications on the chunk size. my understanding is that the data I get back from readData are 16bits interleaved values for left and right channel(or the N available channels).

getStreamBufferSize returns 16384 which means, if I understand correctly that I get 4096 values per channel. the data also should be formatted like this:

left_channel = data[k] & data[k+1]
right_channel = data[k+2] & data[k+3]

is it correct?


  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.