From 4ec530c8a07ca6550e61b4e03af9d90efb3d2b2d Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 31 Jan 2005 11:43:36 +0000 Subject: using af_softclip git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14624 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af_volume.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'libaf') 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); -- cgit v1.2.3