0
0

Hi to all FMOD-Users,

Formerly I used FMOD v3.75; now I’m working with FMOD v4.30.02.

What is the corresponding of FMOD v3.75 ‘FSOUND_GetCurrentLevels’ in FMODEx ?

Do I have to use FMOD v4.30.02 ‘GetSpectrum’ resp. ‘GetWaveData’ to display current Channel- or OutputLevels ?

In case of using ‘GetSpectrum’, which Frequency is used for this purpose, or should I sum up all SpectrumFrequencies ?

Thanks

metis

  • You must to post comments
0
0

Hi to all,

nobody got an answer to my question ?

metis

  • You must to post comments
0
0

[quote="metis":ixhfccxc]Hi to all FMOD-Users,

What is the corresponding of FMOD v3.75 ‘FSOUND_GetCurrentLevels’ in FMODEx ?

metis[/quote:ixhfccxc]

Hi metis,

I’m a FMod newbie myself, but I ran into this exact issue last week.
The solution is suggested in the FMod Ex documentation, specifically in the
TRANSITIONING BETWEEN FMOD 3 AND FMOD EX. API DIFFERENCES
section. Essentially, you must use the System::getWaveData or Channel::getWaveData api. Get a snapshot of the wave for a given channel, and compute your own RMS, Peak, or whatever level you desire.

For example:

float sum = 0.0f;
float loopVals[256];

// get 256 left channel samples
FMOD_RESULT result = pSource->getWaveData(loopVals, 256, 0);

// compute rms
for (int i = 0; i < 256; ++i)
sum += loopVals[i] * loopVals[i];
float rms = sqrtf(sum / 256);

I hope this is what you are looking for.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.