
    W|ht                     `    S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	  \ " S S\	5      5       r
g)	    )	dataclass)concatenate_audioclips)Clip)audio_video_effect)Effectc                   R    \ rS rSr% SrSr\\S'   Sr\	\S'   \
S\S\4S j5       rS	rg)
	AudioLoop	   a  Loops over an audio clip.

Returns an audio clip that plays the given clip either
`n_loops` times, or during `duration` seconds.

Examples
--------

.. code:: python

    from moviepy import *
    videoclip = VideoFileClip('myvideo.mp4')
    music = AudioFileClip('music.ogg')
    audio = music.with_effects([afx.AudioLoop(duration=videoclip.duration)])
    videoclip.with_audio(audio)

Nn_loopsdurationclipreturnc                    U R                   b\  [        U R                   UR                   -  5      S-   U l        [        U R                  U/-  5      R	                  U R                   5      $ [        U R                  U/-  5      $ )zApply the effect to the clip.   )r   intr   r   with_duration)selfr   s     T/home/james-whalen/.local/lib/python3.13/site-packages/moviepy/audio/fx/AudioLoop.pyapplyAudioLoop.apply    sn     ==$t}}t}}<=ADL)$,,$*?@NN  &dlldV&;<<    )r   )__name__
__module____qualname____firstlineno____doc__r   r   __annotations__r   floatr   r   r   __static_attributes__ r   r   r	   r	   	   s=    $ GSHe=$ =4 = =r   r	   N)dataclassesr   moviepy.audio.AudioClipr   moviepy.Clipr   moviepy.decoratorsr   moviepy.Effectr   r	   r    r   r   <module>r&      s/    ! :  1 ! = = =r   