0
0

Hello all,

I have a problem related to determining the frequency of maximum magnitude of the sound playing at a certain moment.

Basically, for sounds acquired through a microphone or other normal equipment (without a pcmreadcallback), the spectrum at any moment reflects accurately the max magnitude frequency of the input; however, for sounds read through a pcmreadcallback, I have a ~10 seconds lag until the spectrum "stabilises" enough and shows a maximum on the correct frequency. (I am using as input test .wav files which contain a sine tone at a certain frequency — 500 Hz, 100Hz, etc., so I’m quite certain as to what the "correct" frequency of maximum magnitude should be. I have determined the ~10 second lag by printing the max magnitude value from the spectrum at every fmod "tick" and observing how long it takes for the spectrum values to be what I expect).

Once in fmod sound format, both types of sound (read "normally" or read via the pcmreadcallback) are treated by the same piece of code, roughly similar to what the fmod example [b:33f7h1x3]pitchdetection[/b:33f7h1x3] does.
I have tried using different spectrum sizes, various FFT windows, but the lag persists.

Does anyone have an idea what could be done in this situation to have a quicker answer? I would say up to 2 seconds or so delay in answer is acceptable.

Thank you very much in advance!
–Cristina.

  • You must to post comments
0
0

Sorry for bumping my own thread, but I’m applying FMOD in a real production project and the deadline is looming upon us 😀

Does anybody have any suggestion about how to get faster the spectrum of sounds "imported" to FMOD via pcmreadcallback?
Thanks a lot!

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.