mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2025-02-17 15:40:19 -05:00
Fix sound mixing
This commit is contained in:
parent
406a8b85a8
commit
b62b4e427a
@ -342,8 +342,8 @@ void SFG_playSound(uint8_t soundIndex, uint8_t volume)
|
|||||||
|
|
||||||
for (int i = 0; i < SFG_SFX_SAMPLE_COUNT; ++i)
|
for (int i = 0; i < SFG_SFX_SAMPLE_COUNT; ++i)
|
||||||
{
|
{
|
||||||
audioBuff[pos] =
|
audioBuff[pos] = mixSamples(audioBuff[pos],
|
||||||
(128 - SFG_GET_SFX_SAMPLE(soundIndex,i)) * volumeScale;
|
(128 - SFG_GET_SFX_SAMPLE(soundIndex,i)) * volumeScale);
|
||||||
|
|
||||||
pos = (pos < SFG_SFX_SAMPLE_COUNT - 1) ? (pos + 1) : 0;
|
pos = (pos < SFG_SFX_SAMPLE_COUNT - 1) ? (pos + 1) : 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user