Hi, I was wondering about the bit depth of the mixing engine.
I looked into the mixer code, and the mixing operation itself consits of a float+float operation ( *d++ += *s++; with d and s being pointers to float)
[code]void AudioSampleBuffer::addFrom (const int destChannel,
const int destStartSample,
const AudioSampleBuffer& source,
const int sourceChannel,
const int sourceStartSample,
int numSamples,
const float gain) throw()
{
jassert (&source != this || sourceChannel != destChannel);
jassert (((unsigned int) destChannel) < (unsigned int) numChannels);
jassert (destStartSample >= 0 && destStartSample + numSamples <= size);
jassert (((unsigned int) sourceChannel) < (unsigned int) source.numChannels);
jassert (sourceStartSample >= 0 && sourceStartSample + numSamples <= source.size);
if (gain != 0.0f && numSamples > 0)
{
float* d = channels [destChannel] + destStartSample;
const float* s = source.channels [sourceChannel] + sourceStartSample;
if (gain != 1.0f)
{
while (--numSamples >= 0)
*d++ += gain * *s++;
}
else
{
while (--numSamples >= 0)
*d++ += *s++;
}
}
}[/code]
Now floats are supposed to be 32bit, aren’t they ? So float+float gives you a float so 32bit. Everything is 32bit here
I had a doubt because, I saw that Tracktion, which AFAIK, is based on Juce, claimls to have a 64bit mixing engine.
If someone could shed some light on this, it would be much appreciated