Hi there.

I’m just fiddling around with FMod to get a better understanding of how things can be done with respect to streaming, samples etc.

Now i’m wondering how I can tackle the following problem:

I want to detect the position in a sample or stream (mp3 or so) where the volume (level) rises above a certain level. Simplified: detecting the start of a song.

I’ve tried some methods using the Levels and spectrum, but discovered that that’s not the best way to go.

Does anyone has a suggestion of how to solve this?


  • You must to post comments

i can tell you what i’m doing to do those effects…

if you need it without playing at the same time..

  1. open fmod with no-soundcard output…
  2. install a callback with FSOUND_DSP_Create()
  3. write your code based on the pcm samples you got through your dsp-callback
  4. you could add some more analysing into this routine… (fadein/fadeout-cue points, volume adjustments etc.)

the best would be if you look into the cddarip sample to see how to implement decoding…. this could could be modified to handle also normal stream files (non-cd)

you could do this also in “realtime” (opening fmod with normal soundoutput) but then you can just save the calculated start point for the next time the songs get’s started…

hope that helps a little…

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.