mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-14 00:09:24 +01:00
Fix MixAdd with volume. The previous volume formula completely failed with volumes >= 1.0 (0x8000). Fixes Tomb Raider Legends (GC) music.
This commit is contained in:
parent
faaaa97c9e
commit
1cecbaedce
@ -337,8 +337,11 @@ void MixAdd(int* out, const s16* input, u16* pvol, bool ramp)
|
|||||||
|
|
||||||
for (u32 i = 0; i < 32; ++i)
|
for (u32 i = 0; i < 32; ++i)
|
||||||
{
|
{
|
||||||
s64 sample = 2 * (s16)input[i] * (s16)volume;
|
s64 sample = input[i];
|
||||||
out[i] += (s32)(sample >> 16);
|
sample *= volume;
|
||||||
|
sample >>= 15;
|
||||||
|
|
||||||
|
out[i] += (s32)sample;
|
||||||
volume += volume_delta;
|
volume += volume_delta;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user