Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alexmarsev/libbs2b.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Marsev <alex.marsev@gmail.com>2014-10-17 12:09:04 +0400
committerAlex Marsev <alex.marsev@gmail.com>2014-10-17 12:09:04 +0400
commit5ca2d59888df047f1e4b028e3a2fd5be8b5a7277 (patch)
tree1c416b1ab64e6a6cdf4ffedd1fd20ce5eecfcb25
parentd7e2fcfc4feebdaf26d92bae6be84b016541fe91 (diff)
Don't clip floating point samplesHEADmaster
-rw-r--r--src/bs2b.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/bs2b.c b/src/bs2b.c
index 623ca77..b87680c 100644
--- a/src/bs2b.c
+++ b/src/bs2b.c
@@ -350,12 +350,6 @@ void bs2b_cross_feed_d( t_bs2bdp bs2bdp, double *sample, int n )
{
cross_feed_d( bs2bdp, sample );
- /* Clipping of overloaded samples */
- if( sample[ 0 ] > 1.0 ) sample[ 0 ] = 1.0;
- if( sample[ 0 ] < -1.0 ) sample[ 0 ] = -1.0;
- if( sample[ 1 ] > 1.0 ) sample[ 1 ] = 1.0;
- if( sample[ 1 ] < -1.0 ) sample[ 1 ] = -1.0;
-
sample += 2;
} /* while */
} /* if */
@@ -374,12 +368,6 @@ void bs2b_cross_feed_dbe( t_bs2bdp bs2bdp, double *sample, int n )
cross_feed_d( bs2bdp, sample );
- /* Clipping of overloaded samples */
- if( sample[ 0 ] > 1.0 ) sample[ 0 ] = 1.0;
- if( sample[ 0 ] < -1.0 ) sample[ 0 ] = -1.0;
- if( sample[ 1 ] > 1.0 ) sample[ 1 ] = 1.0;
- if( sample[ 1 ] < -1.0 ) sample[ 1 ] = -1.0;
-
#ifndef WORDS_BIGENDIAN
int64swap( ( uint32_t * )sample );
int64swap( ( uint32_t * )( sample + 1 ) );
@@ -403,12 +391,6 @@ void bs2b_cross_feed_dle( t_bs2bdp bs2bdp, double *sample, int n )
cross_feed_d( bs2bdp, sample );
- /* Clipping of overloaded samples */
- if( sample[ 0 ] > 1.0 ) sample[ 0 ] = 1.0;
- if( sample[ 0 ] < -1.0 ) sample[ 0 ] = -1.0;
- if( sample[ 1 ] > 1.0 ) sample[ 1 ] = 1.0;
- if( sample[ 1 ] < -1.0 ) sample[ 1 ] = -1.0;
-
#ifdef WORDS_BIGENDIAN
int64swap( ( uint32_t * )sample );
int64swap( ( uint32_t * )( sample + 1 ) );
@@ -432,12 +414,6 @@ void bs2b_cross_feed_f( t_bs2bdp bs2bdp, float *sample, int n )
cross_feed_d( bs2bdp, sample_d );
- /* Clipping of overloaded samples */
- if( sample_d[ 0 ] > 1.0 ) sample_d[ 0 ] = 1.0;
- if( sample_d[ 0 ] < -1.0 ) sample_d[ 0 ] = -1.0;
- if( sample_d[ 1 ] > 1.0 ) sample_d[ 1 ] = 1.0;
- if( sample_d[ 1 ] < -1.0 ) sample_d[ 1 ] = -1.0;
-
sample[ 0 ] = ( float )sample_d[ 0 ];
sample[ 1 ] = ( float )sample_d[ 1 ];
@@ -464,12 +440,6 @@ void bs2b_cross_feed_fbe( t_bs2bdp bs2bdp, float *sample, int n )
cross_feed_d( bs2bdp, sample_d );
- /* Clipping of overloaded samples */
- if( sample_d[ 0 ] > 1.0 ) sample_d[ 0 ] = 1.0;
- if( sample_d[ 0 ] < -1.0 ) sample_d[ 0 ] = -1.0;
- if( sample_d[ 1 ] > 1.0 ) sample_d[ 1 ] = 1.0;
- if( sample_d[ 1 ] < -1.0 ) sample_d[ 1 ] = -1.0;
-
sample[ 0 ] = ( float )sample_d[ 0 ];
sample[ 1 ] = ( float )sample_d[ 1 ];
@@ -501,12 +471,6 @@ void bs2b_cross_feed_fle( t_bs2bdp bs2bdp, float *sample, int n )
cross_feed_d( bs2bdp, sample_d );
- /* Clipping of overloaded samples */
- if( sample_d[ 0 ] > 1.0 ) sample_d[ 0 ] = 1.0;
- if( sample_d[ 0 ] < -1.0 ) sample_d[ 0 ] = -1.0;
- if( sample_d[ 1 ] > 1.0 ) sample_d[ 1 ] = 1.0;
- if( sample_d[ 1 ] < -1.0 ) sample_d[ 1 ] = -1.0;
-
sample[ 0 ] = ( float )sample_d[ 0 ];
sample[ 1 ] = ( float )sample_d[ 1 ];