From 51106a481cc8a60c288ace0321e85783c7c4e35c Mon Sep 17 00:00:00 2001 From: Cnidarias Date: Fri, 31 Dec 2021 15:31:57 +0100 Subject: 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 --- modules/vorbis/audio_stream_ogg_vorbis.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/vorbis') diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp index 06ed021a5a..fec8c44fc4 100644 --- a/modules/vorbis/audio_stream_ogg_vorbis.cpp +++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp @@ -110,7 +110,7 @@ int AudioStreamPlaybackOGGVorbis::_mix_frames_vorbis(AudioFrame *p_buffer, int p if (info.channels > 1) { for (int frame = 0; frame < frames; frame++) { p_buffer[frame].l = pcm[0][frame]; - p_buffer[frame].r = pcm[0][frame]; + p_buffer[frame].r = pcm[1][frame]; } } else { for (int frame = 0; frame < frames; frame++) { -- cgit v1.2.3