fix loop counter for eventstream, closes #4493

(cherry picked from commit 8f7a1367fe)
This commit is contained in:
Juan Linietsky 2016-06-20 14:43:20 -03:00 committed by Rémi Verschelde
parent a71ea0abc6
commit 7076e98f40
1 changed files with 6 additions and 4 deletions

View File

@ -628,11 +628,13 @@ 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) {
if (order<last_order) {
if (!loop) {
stop();
} else {
loops++;
}
}
last_order=order;
return false;
}