U
    a¨+d×  ã                   @   s.   d dl mZmZmZ eeeddd„ƒƒƒZdS )é    )Úapply_to_audioÚapply_to_maskÚrequires_durationNc                    s2   ˆ   ‡ fdd„¡}|r |ˆ j }|r.| |¡}|S )ak  
    Returns a clip that plays the current clip in an infinite loop.
    Ideal for clips coming from gifs.
    
    Parameters
    ------------
    n
      Number of times the clip should be played. If `None` the
      the clip will loop indefinitely (i.e. with no set duration).

    duration
      Total duration of the clip. Can be specified instead of n.
    c                    s
   | ˆ j  S )N)Úduration)Út©Úself© ú9/tmp/pip-unpacked-wheel-0yp4gafk/moviepy/video/fx/loop.pyÚ<lambda>   ó    zloop.<locals>.<lambda>)Zfl_timer   Zset_duration)r   Únr   Úresultr	   r   r
   Úloop   s    

r   )NN)Zmoviepy.decoratorsr   r   r   r   r	   r	   r	   r
   Ú<module>   s   