mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Fix WM_DoGetOutput for big-endian machines
- Besides being little-endian centric, this bit shifting madness was unneccessary since the values were already clamped to a 16-bit range, so all we need to do is cast them to a short.
This commit is contained in:
parent
b1405921bf
commit
ee46799d9e
1 changed files with 3 additions and 4 deletions
|
@ -3744,10 +3744,9 @@ static int WM_DoGetOutput(midi * handle, char * buffer,
|
|||
* Write to the buffer
|
||||
* ===================
|
||||
*/
|
||||
(*buffer++) = left_mix & 0xff;
|
||||
(*buffer++) = ((left_mix >> 8) & 0x7f) | ((left_mix >> 24) & 0x80);
|
||||
(*buffer++) = right_mix & 0xff;
|
||||
(*buffer++) = ((right_mix >> 8) & 0x7f) | ((right_mix >> 24) & 0x80);
|
||||
((short *)buffer)[0] = (short)left_mix;
|
||||
((short *)buffer)[1] = (short)right_mix;
|
||||
buffer += 4;
|
||||
}
|
||||
_WM_Unlock(&mdi->lock);
|
||||
return buffer_used;
|
||||
|
|
Loading…
Reference in a new issue