You are correct, it is possible to overflow / clip if there are too many active tracks at a high volume.
On Monday, June 1, 2015 at 5:44:55 PM UTC-7, jcboo5...@gmail.com wrote: > > Hi. > > I'm Android Developer. > > I have some questions about AudioMixer of Android AudioFramework. > > > > 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, > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.