Skip to content

Commit

Permalink
Merge pull request #180 from gopxl/fix-ogg-vorbis-channel-bug
Browse files Browse the repository at this point in the history
Fix Ogg/vorbis files are mono even if files have more channels
  • Loading branch information
MarkKremer authored Sep 5, 2024
2 parents 6bb4a2a + e6e70c7 commit 696dcd5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vorbis/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,20 @@ func (d *decoder) Stream(samples [][2]float64) (n int, ok bool) {
leftChannelIndex = 0
rightChannelIndex = 0
case 2:
fallthrough
case 4:
leftChannelIndex = 0
rightChannelIndex = 1
case 3:
fallthrough
case 5:
fallthrough
case 6:
fallthrough
case 7:
fallthrough
case 8:
fallthrough
default:
leftChannelIndex = 0
rightChannelIndex = 2
Expand Down

0 comments on commit 696dcd5

Please sign in to comment.