summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorFabian Mathews <supagu@gmail.com>2017-07-29 18:59:51 +0930
committerFabian Mathews <supagu@gmail.com>2017-07-29 18:59:51 +0930
commit207f596e69bcf822fa83f93251a947a85b77505d (patch)
treea73a86d7333da265f9f77f7333caf673351e5e71 /modules
parent260d179d31972b82e1d604174ccf1663343bfa97 (diff)
Fixed AudioStreamPlaybackOGGVorbis::_mix_internal getting stuck in infinite loop causing audio to freeze
Diffstat (limited to 'modules')
-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 c645a55703..7b8b2abebb 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
@@ -39,7 +39,7 @@ void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fra
int todo = p_frames;
- while (todo) {
+ while (todo && active) {
int mixed = stb_vorbis_get_samples_float_interleaved(ogg_stream, 2, (float *)p_buffer, todo * 2);
todo -= mixed;