Skip to content

Commit

Permalink
Merge pull request #582 from gpantelis/patch-7
Browse files Browse the repository at this point in the history
PEP 8 compatible
  • Loading branch information
Gloin1313 committed Jun 6, 2017
2 parents 1c5c633 + b89966e commit 6ba12d0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions moviepy/audio/fx/volumex.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
from moviepy.decorators import audio_video_fx


@audio_video_fx
def volumex(clip, factor):
""" Returns a clip with audio volume multiplied by the
value `factor`. Can be applied to both audio and video clips.
This effect is loaded as a clip method when you use moviepy.editor,
so you can just write ``clip.volumex(2)``
Examples
---------
>>> newclip = volumex(clip, 2.0) # doubles audio volume
>>> newclip = clip.fx( volumex, 0.5) # half audio, use with fx
>>> newclip = clip.volumex(2) # only if you used "moviepy.editor"
"""
"""
return clip.fl(lambda gf, t: factor * gf(t),
keep_duration = True)
keep_duration=True)

0 comments on commit 6ba12d0

Please sign in to comment.