Fix casting on MSU1 volume.

This commit is contained in:
Brandon Wright 2018-06-02 20:25:25 -05:00
parent df02ba62fd
commit 2645ba8d18
1 changed files with 3 additions and 2 deletions

View File

@ -433,8 +433,9 @@ void S9xMSU1Generate(size_t sample_count)
int bytes_read = READ_STREAM((char *)&sample, 4, audioStream);
if (bytes_read == 4)
{
*left = (int32) GET_LE16(left) * MSU1.MSU1_VOLUME / 255;
*right = (int32) GET_LE16(right) * MSU1.MSU1_VOLUME / 255;
*left = ((int32)(int16)GET_LE16(left) * MSU1.MSU1_VOLUME / 255);
*right = ((int32)(int16)GET_LE16(right) * MSU1.MSU1_VOLUME / 255);
*(bufPos++) = *left;
*(bufPos++) = *right;