diff options
Diffstat (limited to 'drivers/chibi/event_stream_chibi.cpp')
-rw-r--r-- | drivers/chibi/event_stream_chibi.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/chibi/event_stream_chibi.cpp b/drivers/chibi/event_stream_chibi.cpp index 3449583d36..b88f4ee70e 100644 --- a/drivers/chibi/event_stream_chibi.cpp +++ b/drivers/chibi/event_stream_chibi.cpp @@ -616,7 +616,7 @@ void CPFileAccessWrapperImpl::store_dword(uint32_t p_dest){ Error EventStreamPlaybackChibi::_play() { last_order=0; - loops++; + loops=0; player->play_start_song(); total_usec=0; @@ -628,10 +628,12 @@ bool EventStreamPlaybackChibi::_update(AudioMixer* p_mixer, uint64_t p_usec){ total_usec+=p_usec; mixer.process_usecs(p_usec,volume,pitch_scale,tempo_scale); int order=player->get_current_order(); - if (order<last_order && !loop) { - stop(); - } else { - loops++; + if (order<last_order) { + if (!loop) { + stop(); + } else { + loops++; + } } last_order=order; return false; |