Fix OGG Vorbis playback with more than one channel

When an OGG Vorbis file has more than one channel we accidentily were
assigning only the left channel to both the L and R channels of the
AudioFrame output buffer
This commit is contained in:
Cnidarias 2021-12-31 15:31:57 +01:00
parent 91b97dac03
commit 51106a481c
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ int AudioStreamPlaybackOGGVorbis::_mix_frames_vorbis(AudioFrame *p_buffer, int p
if (info.channels > 1) { if (info.channels > 1) {
for (int frame = 0; frame < frames; frame++) { for (int frame = 0; frame < frames; frame++) {
p_buffer[frame].l = pcm[0][frame]; p_buffer[frame].l = pcm[0][frame];
p_buffer[frame].r = pcm[0][frame]; p_buffer[frame].r = pcm[1][frame];
} }
} else { } else {
for (int frame = 0; frame < frames; frame++) { for (int frame = 0; frame < frames; frame++) {