ALL: Fix for possible mixer distortion
|Reported by:||eriktorbjorn||Owned by:||fingolfin|
It looks to me as if there is a potential for arithmetic overflow in the mixer with some of the channel types. In reality I've only managed to provoke a few popping sounds when cranking up all the volume controls to their maximum setting, but I still think it'd be safer to use clamped_add_16() than to just add the sample to the buffer and assume it will work.
Ticket imported from: #639931. Ticket imported from: patches/236.