diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp index b9421221bf..c13787c7b4 100644 --- a/src/sound/oalsound.cpp +++ b/src/sound/oalsound.cpp @@ -1045,7 +1045,7 @@ std::pair OpenALSoundRenderer::LoadSoundRaw(BYTE *sfxdata, int { int sum = 0; for(int c = 0;c < channels;c++) - sum = ((short*)sfxdata)[i*channels + c]; + sum += ((short*)sfxdata)[i*channels + c]; ((short*)sfxdata)[i] = sum / channels; } } @@ -1055,7 +1055,7 @@ std::pair OpenALSoundRenderer::LoadSoundRaw(BYTE *sfxdata, int { int sum = 0; for(int c = 0;c < channels;c++) - sum = sfxdata[i*channels + c] - 128; + sum += sfxdata[i*channels + c] - 128; sfxdata[i] = (sum / channels) + 128; } }