From a0b4b5680944ee7c2ae1b7af63a721623c1a6b69 Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Fri, 22 Mar 2024 19:09:34 +0300 Subject: [PATCH] libasnd: Fixed the swapped stereo problem (#170) #169 --- libasnd/dsp_mixer/dsp_mixer.s | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libasnd/dsp_mixer/dsp_mixer.s b/libasnd/dsp_mixer/dsp_mixer.s index 3b5261461..54133bc2b 100644 --- a/libasnd/dsp_mixer/dsp_mixer.s +++ b/libasnd/dsp_mixer/dsp_mixer.s @@ -834,10 +834,10 @@ stereo_8bits: lrri $ACL0, @$AR2 mrr $ACM0, $ACL0 andi $ACM0, #0xff00 - mrr $AXH1, $ACM0 + mrr $AXH0, $ACM0 lsl $ACC0, #8 - mrr $AXH0, $ACL0 + mrr $AXH1, $ACL0 jmp out_samp mono_16bits: @@ -852,8 +852,8 @@ stereo_16bits: // 16 bits stereo - lrri $AXH1, @$AR2 lrri $AXH0, @$AR2 + lrri $AXH1, @$AR2 jmp out_samp mono_8bits_unsigned: @@ -892,17 +892,17 @@ stereo_8bits_unsigned: xori $ACM0, #0x8080 // convert unsigned->signed mrr $ACL0, $ACM0 andi $ACM0, #0xff00 - mrr $AXH1, $ACM0 + mrr $AXH0, $ACM0 lsl $ACC0, #8 - mrr $AXH0, $ACL0 + mrr $AXH1, $ACL0 jmp out_samp stereo_16bits_le: // 16 bits stereo little-endian - lrri $ACM1, @$AR2 lrri $ACM0, @$AR2 + lrri $ACM1, @$AR2 mrr $ACL1, $ACM1 mrr $ACL0, $ACM0 lsl $ACC1, #8 // byteswap