
    g                     T    d dl mZ d dlmZ d dlmZ d dlmZ e G d de             Zy)    )	dataclass)Clip)audio_video_effect)Effectc                   H    e Zd ZU dZdZeed<   dZeed<   ede	de	fd       Z
y)	MultiplyStereoVolumea^  For a stereo audioclip, this function enables to change the volume
    of the left and right channel separately (with the factors `left`
    and `right`). Makes a stereo audio clip in which the volume of left
    and right is controllable.

    Examples
    --------

    .. code:: python

        from moviepy import AudioFileClip
        music = AudioFileClip('music.ogg')
        # mutes left channel
        audio_r = music.with_effects([afx.MultiplyStereoVolume(left=0, right=1)])
        # halves audio volume
        audio_h = music.with_effects([afx.MultiplyStereoVolume(left=0.5, right=0.5)])
       leftrightclipreturnc                 0      fd}|j                  |      S )zApply the effect to the clip.c                 $    | |      }t        |      dk(  r-|j                  j                  z  }|S j                  z  }|S t        t        |d               D ]1  }|d d |fxx   |dz  dk(  rj                  nj                  z  cc<   3 |S )Nr	   r      )lenr
   r   range)	get_frametframeiselfs       n/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/moviepy/audio/fx/MultiplyStereoVolume.pystereo_volumez1MultiplyStereoVolume.apply.<locals>.stereo_volume#   s    aLE5zQdii&;K L	 BFK L s58}- KA!Q$KA
499

JKKL    )	transform)r   r   r   s   `  r   applyzMultiplyStereoVolume.apply   s    	 ~~m,,r   N)__name__
__module____qualname____doc__r
   float__annotations__r   r   r   r    r   r   r   r      s<    $ D%OE5-$ -4 - -r   r   N)	dataclassesr   moviepy.Clipr   moviepy.decoratorsr   moviepy.Effectr   r   r#   r   r   <module>r(      s,    !  1 ! #-6 #- #-r   