
    W|h                     T    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)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
)MultiplyStereoVolume   a*  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                 2   ^  U 4S jnUR                  U5      $ )zApply the effect to the clip.c                 &  > U " U5      n[        U5      S:X  a*  UTR                  b  TR                  OTR                  -  nU$ [        [        US   5      5       H3  nUS S 2U4==   US-  S:X  a  TR                  OTR                  -  ss'   M5     U$ )Nr
   r      )lenr   r   range)	get_frametframeiselfs       _/home/james-whalen/.local/lib/python3.13/site-packages/moviepy/audio/fx/MultiplyStereoVolume.pystereo_volume1MultiplyStereoVolume.apply.<locals>.stereo_volume#   s    aLE5zQdii&;K L s58}-A!Q$KA
499

JK .L    )	transform)r   r   r   s   `  r   applyMultiplyStereoVolume.apply   s    	 ~~m,,r    N)__name__
__module____qualname____firstlineno____doc__r   float__annotations__r   r   r   r   __static_attributes__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   