diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-01-31 11:43:36 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-01-31 11:43:36 +0000 |
commit | 4ec530c8a07ca6550e61b4e03af9d90efb3d2b2d (patch) | |
tree | b86e909b1cef836e85219defafe3ffff5845b659 /libaf | |
parent | f63682aedc73b95af721ca8d03915d2b45caeee2 (diff) | |
download | mpv-4ec530c8a07ca6550e61b4e03af9d90efb3d2b2d.tar.bz2 mpv-4ec530c8a07ca6550e61b4e03af9d90efb3d2b2d.tar.xz |
using af_softclip
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14624 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libaf')
-rw-r--r-- | libaf/af_volume.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libaf/af_volume.c b/libaf/af_volume.c index e6221fe51a..8485af5549 100644 --- a/libaf/af_volume.c +++ b/libaf/af_volume.c @@ -177,14 +177,8 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data) s->pow[ch] = t*s->pow[ch] + pow*s->time; // LP filter /* Soft clipping, the sound of a dream, thanks to Jon Wattes post to Musicdsp.org */ - if(s->soft){ - if (x >= M_PI/2) - x = 1.0; - else if(x <= -M_PI/2) - x = -1.0; - else - x = sin(x); - } + if(s->soft) + x=af_softclip(x); // Hard clipping else x=clamp(x,-1.0,1.0); |