@requires_duration
@apply_to_mask
@apply_to_audio
def loop(self, n=None, duration=None):
 result = self.fl_time((lambda t: (t % self.duration)))
 if n:
  duration = (n * self.duration)
 if duration:
  result = result.set_duration(duration)
 return result

@ requires_duration @ apply_to_mask @ apply_to_audio def loop ( self , n = None , duration = None ) : result = self . fl_time ( ( lambda t : ( t % self . duration ) ) ) if n : duration = ( n * self . duration ) if duration : result = result . set_duration ( duration ) return result
custom event loop implementation uses poll instead of loop to respect active flag .