summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorCnidarias <roessner.pascal@gmail.com>2021-12-31 15:31:57 +0100
committerCnidarias <roessner.pascal@gmail.com>2021-12-31 15:31:57 +0100
commit51106a481cc8a60c288ace0321e85783c7c4e35c (patch)
tree0a179d6f1e76c88d45638d0a2adaf0f4dabbe495 /modules
parent91b97dac03996c4b8791633ea6fa8fdc47852cb6 (diff)
downloadredot-engine-51106a481cc8a60c288ace0321e85783c7c4e35c.tar.gz
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
Diffstat (limited to 'modules')
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.cpp2
1 files changed, 1 insertions, 1 deletions
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++) {