diff --git a/src/twn_audio.c b/src/twn_audio.c index 61b20f1..c39ebc9 100644 --- a/src/twn_audio.c +++ b/src/twn_audio.c @@ -366,9 +366,11 @@ static void audio_mixin_streams(const AudioChannel *channel, for (size_t s = 0; s < frames; ++s) { /* left channel */ sa[s * 2 + 0] += (float)(sb[s * 2 + 0] * channel->volume * left_panning); + sa[s * 2 + 0] *= 1 / (float)M_2_SQRTPI; /* right channel */ sa[s * 2 + 1] += (float)(sb[s * 2 + 1] * channel->volume * right_panning); + sa[s * 2 + 1] *= 1 / (float)M_2_SQRTPI; } }