U
    a+d                     @   s,   d dl Zd dlmZmZ eedd ZdS )    N)audio_video_fxrequires_durationc                    s    fdd} j |ddS )zw Return a sound clip where the sound fades out progressively
        over ``duration`` seconds at the end of the clip. c                    sl   | |}t |r:td j|   d}t ||g}n*t d j|   d}t ||gj}|| S )Ng      ?   )npZisscalarmindurationarrayZminimumZvstackT)ZgftZgftZfactorclipr    B/tmp/pip-unpacked-wheel-0yp4gafk/moviepy/audio/fx/audio_fadeout.pyfading   s    
zaudio_fadeout.<locals>.fadingT)Zkeep_duration)fl)r   r   r   r   r   r   audio_fadeout   s    r   )Znumpyr   Zmoviepy.decoratorsr   r   r   r   r   r   r   <module>   s   