Skip to content

Commit

Permalink
Fixed AudioStreamPlaybackOGGVorbis::_mix_internal getting stuck in in…
Browse files Browse the repository at this point in the history
…finite loop causing audio to freeze
  • Loading branch information
supagu committed Jul 29, 2017
1 parent 260d179 commit 207f596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 207f596

Please sign in to comment.