Преглед на файлове

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
Cnidarias преди 3 години
родител
ревизия
51106a481c
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      modules/vorbis/audio_stream_ogg_vorbis.cpp

+ 1 - 1
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++) {