Email or username:

Password:

Forgot your password?
Top-level
John Kaniarz

@d6 averaging is the correct way to do this. The problem you’re experiencing is non-linear human perception. (And maybe some cancellation of out of phase frequencies)

You’ll just have to fudge in a volume boost… which will probably take you out of 8-bit range.

2 comments
John Kaniarz

@d6 when thinking about the volume, also keep in mind that you’re going from two speakers at full volume to one speaker at full volume.

Try this: add the samples, don’t divide, and clip/saturate them instead. This will cause distortion, but it should be roughly the right loudness.

John Kaniarz

@d6 Another thing to consider in your divide step is that you’re introducing aharmonic quantization error. If you want to get fancy, add one bit of noise to your 16-bit sum before dividing.

This will cause your error to be white noise instead, which sounds a bit better.

Go Up