When Mixing audio frames sample by sample,
In theory, Overflow can be occurred.
Because size of sample is 16bit size , so 32bit outTemp buffer is used in AudioMixer.cpp
But, Tracks can be max 32 tracks, so It can be the range of
-32*4096*32767 ~ 32(max number of tracks)*4096(volume max value)*32767(sample max valume).
But 32bit signed pcm can be ranged of -16*4096*32767 ~ 16*4096*32767.
So 16*4096*32767 ~ 32(max number of tracks)*4096(volume max value)*32767(sample max valume) or -32*4096*32767~ -16*4096*32767 range occur overflow.
I want know the reason that how come the outTemp buffer size is 32bit, and
When the integer volume range is 0~ 2048 ,or outTemp buffer size is 64bit, the overflow does not occur.
Please reply the question.
Thanks,