summaryrefslogtreecommitdiff
path: root/modules/stb_vorbis
diff options
context:
space:
mode:
authorEllen Poe <ellen@ellenhp.me>2021-02-15 20:42:45 -0800
committerEllen Poe <ellen@ellenhp.me>2021-02-15 20:42:45 -0800
commitf993d2eeee6d87309dd1b1da6b6beee0e1661f4e (patch)
tree3be1a995ae6e64fcdc93ac84e784b538e0be3ee0 /modules/stb_vorbis
parenta59286f0198c7a3141fc9a8af4d458c7dcfbf653 (diff)
Fix mono->stereo conversion for oggs (see #40630)
Diffstat (limited to 'modules/stb_vorbis')
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
index f7bf650354..6732078efc 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
@@ -47,7 +47,7 @@ void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fra
int mixed = stb_vorbis_get_samples_float_interleaved(ogg_stream, 2, buffer, todo * 2);
if (vorbis_stream->channels == 1 && mixed > 0) {
//mix mono to stereo
- for (int i = start_buffer; i < mixed; i++) {
+ for (int i = start_buffer; i < start_buffer + mixed; i++) {
p_buffer[i].r = p_buffer[i].l;
}
}