mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Fix 16-bit audio mixing
This commit is contained in:
parent
2762044313
commit
6c08ae1966
2 changed files with 6 additions and 6 deletions
|
@ -98,7 +98,7 @@ uint32_t MV_Mix16BitMono16(struct VoiceNode * const voice, uint32_t length)
|
|||
|
||||
do
|
||||
{
|
||||
int32_t const isample0 = B_LITTLE16(source[position >> 16]);
|
||||
int32_t const isample0 = (int16_t)B_LITTLE16(source[position >> 16]);
|
||||
|
||||
position += rate;
|
||||
|
||||
|
@ -128,7 +128,7 @@ uint32_t MV_Mix16BitStereo16(struct VoiceNode * const voice, uint32_t length)
|
|||
|
||||
do
|
||||
{
|
||||
int32_t const isample0 = B_LITTLE16(source[position >> 16]);
|
||||
int32_t const isample0 = (int16_t)B_LITTLE16(source[position >> 16]);
|
||||
|
||||
position += rate;
|
||||
|
||||
|
|
|
@ -100,8 +100,8 @@ uint32_t MV_Mix16BitMono16Stereo(struct VoiceNode * const voice, uint32_t length
|
|||
|
||||
do
|
||||
{
|
||||
int32_t const isample0 = B_LITTLE16(source[(position >> 16) << 1]);
|
||||
int32_t const isample1 = B_LITTLE16(source[((position >> 16) << 1) + 1]);
|
||||
int32_t const isample0 = (int16_t)B_LITTLE16(source[(position >> 16) << 1]);
|
||||
int32_t const isample1 = (int16_t)B_LITTLE16(source[((position >> 16) << 1) + 1]);
|
||||
|
||||
position += rate;
|
||||
|
||||
|
@ -131,8 +131,8 @@ uint32_t MV_Mix16BitStereo16Stereo(struct VoiceNode * const voice, uint32_t leng
|
|||
|
||||
do
|
||||
{
|
||||
int32_t const isample0 = B_LITTLE16(source[(position >> 16) << 1]);
|
||||
int32_t const isample1 = B_LITTLE16(source[((position >> 16) << 1) + 1]);
|
||||
int32_t const isample0 = (int16_t)B_LITTLE16(source[(position >> 16) << 1]);
|
||||
int32_t const isample1 = (int16_t)B_LITTLE16(source[((position >> 16) << 1) + 1]);
|
||||
|
||||
position += rate;
|
||||
|
||||
|
|
Loading…
Reference in a new issue