Tiny cleanup in Sound.cpp

The samples are unsigned
This commit is contained in:
Clownacy 2019-02-11 14:43:31 +00:00
parent cad4518d30
commit 9c7457f4e2

View file

@ -323,7 +323,7 @@ size_t MakePixToneObject(const PIXTONEPARAMETER *ptp, int ptp_num, int no)
if (pcm_buffer[j] + mixed_pcm_buffer[j] - 0x100 < -0x7F) if (pcm_buffer[j] + mixed_pcm_buffer[j] - 0x100 < -0x7F)
mixed_pcm_buffer[j] = 0; mixed_pcm_buffer[j] = 0;
else if (pcm_buffer[j] + mixed_pcm_buffer[j] - 0x100 > 0x7F) else if (pcm_buffer[j] + mixed_pcm_buffer[j] - 0x100 > 0x7F)
mixed_pcm_buffer[j] = -1; mixed_pcm_buffer[j] = 0xFF;
else else
mixed_pcm_buffer[j] += pcm_buffer[j] + -0x80; mixed_pcm_buffer[j] += pcm_buffer[j] + -0x80;
} }