Skip to content

Commit

Permalink
libasnd: Fixed the swapped stereo problem (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohlstand authored Mar 22, 2024
1 parent 3797418 commit a0b4b56
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libasnd/dsp_mixer/dsp_mixer.s
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -852,8 +852,8 @@ stereo_16bits:

// 16 bits stereo

lrri $AXH1, @$AR2
lrri $AXH0, @$AR2
lrri $AXH1, @$AR2
jmp out_samp

mono_8bits_unsigned:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a0b4b56

Please sign in to comment.