Fix OGG audio loops

This commit is contained in:
Fabio Iotti 2020-03-02 21:36:01 +00:00
parent c9768f15f7
commit 4f8d1c47b8
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,8 @@ void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fra
if (todo) { if (todo) {
//end of file! //end of file!
if (vorbis_stream->loop && mixed > 0) { bool is_not_empty = mixed > 0 || stb_vorbis_stream_length_in_samples(ogg_stream) > 0;
if (vorbis_stream->loop && is_not_empty) {
//loop //loop
seek(vorbis_stream->loop_offset); seek(vorbis_stream->loop_offset);
loops++; loops++;