Are you limiting the output (by adding in 16 bit
and then limiting)?:
if (sampleL > 127)
sampleL = 127;
if (sampleL < -127)
sampleL = -127;
--- In gbadev@yahoogroups.com, Josh DeBonis <joshdebonis@y...> wrote:
> I'm trying to mix 2 sound samples on the GBA. When I
> play them individually, they sound great. When I mix
> them together, a sound is produced, but it's not
> pretty. I am simply adding the values of each sample
> together (it is a sample of the amplitude). I have
> tried scaling down the amplitudes before I add them,
> to prevent clipping, and this does not prevent the
> problem. Do I have to do any strange adding because of
> twos complement? Anyone know what I might be missing?
>
> Thanks,
> Joshua
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
> http://webhosting.yahoo.com/ps/sb/