Hi,
I was investigating the LevelMeter struct and the getLevelGetters associated and I found out that in the AudioDeviceManager::audioDeviceCallBackInt function which is in charge of calling the sucessive callbacks registered in the AudioDeviceManager calls in the beggining both the LeverInputGetter function and the output version. Shouldn’t the outuput version go to the end? At the begining the function reports 0 level as it expected.
void AudioDeviceManager::audioDeviceIOCallbackInt (const float** inputChannelData,
int numInputChannels,
float** outputChannelData,
int numOutputChannels,
int numSamples)
{
const ScopedLock sl (audioCallbackLock);
inputLevelGetter->updateLevel (inputChannelData, numInputChannels, numSamples);
outputLevelGetter->updateLevel (const_cast<const float**> (outputChannelData), numOutputChannels, numSamples);
if (callbacks.size() > 0)
{
. //some code
}
----
for (int i = callbacks.size(); --i > 0;)
{
----
}
A better place for doing the outputlevelGetter?
}
My seccond question is:
Why callling the succesive callbacks registered with a tempbuffer as output and then sum them ? Shouldn’t it be better call the callback with the outputbuffer and the function called be in charge of sum the samples? It’s a pity that as deviceManger can register more than one callback all the callbacks begin with a empty or spurious output buffer and we can not chaining the outputs.
Thanks for reading me