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:
authorboris_mikhaylov <boris_mikhaylov@bc0edfbe-c936-4687-b64d-f70bc3985e72>2009-03-23 09:46:28 +0300
committerboris_mikhaylov <boris_mikhaylov@bc0edfbe-c936-4687-b64d-f70bc3985e72>2009-03-23 09:46:28 +0300
commit270a284b1d47280887814497ad76c93f98bbf327 (patch)
tree289143f1e0b304fd3a250ad1c709f256af62cccc
parentcb2e76466b4e5a076d1d2d67b5c9cc5d460b3b19 (diff)
int24_t -> bs2b_int24_t
git-svn-id: svn://svn.code.sf.net/p/bs2b/code/trunk/libbs2b@79 bc0edfbe-c936-4687-b64d-f70bc3985e72
-rw-r--r--src/bs2b.c32
-rw-r--r--src/bs2b.h6
-rw-r--r--src/bs2bclass.cpp6
-rw-r--r--src/bs2bclass.h6
-rw-r--r--src/bs2btypes.h4
5 files changed, 27 insertions, 27 deletions
diff --git a/src/bs2b.c b/src/bs2b.c
index 0adeab2..47f8fe5 100644
--- a/src/bs2b.c
+++ b/src/bs2b.c
@@ -35,7 +35,7 @@ static void int16swap( uint16_t *x )
*x = ( *x >> 8 ) | ( *x << 8 );
}
-static void int24swap( uint24_t *x )
+static void int24swap( bs2b_uint24_t *x )
{
uint8_t x1;
@@ -62,7 +62,7 @@ static void int64swap( uint32_t *x )
int32swap( x + 1 );
}
-static double int242double( int24_t *in )
+static double int242double( bs2b_int24_t *in )
{
int32_t out =
#ifdef WORDS_BIGENDIAN
@@ -80,7 +80,7 @@ static double int242double( int24_t *in )
return ( double )out;
} /* int242double() */
-static double uint242double( uint24_t *in )
+static double uint242double( bs2b_uint24_t *in )
{
uint32_t out =
#ifdef WORDS_BIGENDIAN
@@ -96,7 +96,7 @@ static double uint242double( uint24_t *in )
return ( double )out;
} /* uint242double() */
-static void double2int24( double in, int24_t *out )
+static void double2int24( double in, bs2b_int24_t *out )
{
uint32_t i = ( uint32_t )in;
@@ -111,7 +111,7 @@ static void double2int24( double in, int24_t *out )
#endif /* WORDS_BIGENDIAN */
} /* double2int24() */
-static void double2uint24( double in, uint24_t *out )
+static void double2uint24( double in, bs2b_uint24_t *out )
{
uint32_t i = ( uint32_t )in;
@@ -684,7 +684,7 @@ void bs2b_cross_feed_u8( t_bs2bdp bs2bdp, uint8_t *sample, int n )
} /* if */
} /* bs2b_cross_feed_u8() */
-void bs2b_cross_feed_s24( t_bs2bdp bs2bdp, int24_t *sample, int n )
+void bs2b_cross_feed_s24( t_bs2bdp bs2bdp, bs2b_int24_t *sample, int n )
{
double sample_d[ 2 ];
@@ -705,7 +705,7 @@ void bs2b_cross_feed_s24( t_bs2bdp bs2bdp, int24_t *sample, int n )
} /* if */
} /* bs2b_cross_feed_s24() */
-void bs2b_cross_feed_s24be( t_bs2bdp bs2bdp, int24_t *sample, int n )
+void bs2b_cross_feed_s24be( t_bs2bdp bs2bdp, bs2b_int24_t *sample, int n )
{
double sample_d[ 2 ];
@@ -714,8 +714,8 @@ void bs2b_cross_feed_s24be( t_bs2bdp bs2bdp, int24_t *sample, int n )
while( n-- )
{
#ifndef WORDS_BIGENDIAN
- int24swap( ( uint24_t * )sample );
- int24swap( ( uint24_t * )( sample + 1 ) );
+ int24swap( ( bs2b_uint24_t * )sample );
+ int24swap( ( bs2b_uint24_t * )( sample + 1 ) );
#endif
sample_d[ 0 ] = int242double( sample ) / MAX_INT24_VALUE;
@@ -727,8 +727,8 @@ void bs2b_cross_feed_s24be( t_bs2bdp bs2bdp, int24_t *sample, int n )
double2int24( sample_d[ 1 ] * MAX_INT24_VALUE, sample + 1 );
#ifndef WORDS_BIGENDIAN
- int24swap( ( uint24_t * )sample );
- int24swap( ( uint24_t * )( sample + 1 ) );
+ int24swap( ( bs2b_uint24_t * )sample );
+ int24swap( ( bs2b_uint24_t * )( sample + 1 ) );
#endif
sample += 2;
@@ -736,7 +736,7 @@ void bs2b_cross_feed_s24be( t_bs2bdp bs2bdp, int24_t *sample, int n )
} /* if */
} /* bs2b_cross_feed_s24be() */
-void bs2b_cross_feed_s24le( t_bs2bdp bs2bdp, int24_t *sample, int n )
+void bs2b_cross_feed_s24le( t_bs2bdp bs2bdp, bs2b_int24_t *sample, int n )
{
double sample_d[ 2 ];
@@ -745,8 +745,8 @@ void bs2b_cross_feed_s24le( t_bs2bdp bs2bdp, int24_t *sample, int n )
while( n-- )
{
#ifdef WORDS_BIGENDIAN
- int24swap( ( uint24_t * )sample );
- int24swap( ( uint24_t * )( sample + 1 ) );
+ int24swap( ( bs2b_uint24_t * )sample );
+ int24swap( ( bs2b_uint24_t * )( sample + 1 ) );
#endif
sample_d[ 0 ] = int242double( sample ) / MAX_INT24_VALUE;
@@ -758,8 +758,8 @@ void bs2b_cross_feed_s24le( t_bs2bdp bs2bdp, int24_t *sample, int n )
double2int24( sample_d[ 1 ] * MAX_INT24_VALUE, sample + 1 );
#ifdef WORDS_BIGENDIAN
- int24swap( ( uint24_t * )sample );
- int24swap( ( uint24_t * )( sample + 1 ) );
+ int24swap( ( bs2b_uint24_t * )sample );
+ int24swap( ( bs2b_uint24_t * )( sample + 1 ) );
#endif
sample += 2;
diff --git a/src/bs2b.h b/src/bs2b.h
index 6b24580..d06224b 100644
--- a/src/bs2b.h
+++ b/src/bs2b.h
@@ -149,13 +149,13 @@ void bs2b_cross_feed_s8( t_bs2bdp bs2bdp, int8_t *sample, int n );
void bs2b_cross_feed_u8( t_bs2bdp bs2bdp, uint8_t *sample, int n );
/* sample poits to 24bit signed integers native endians */
-void bs2b_cross_feed_s24( t_bs2bdp bs2bdp, int24_t *sample, int n );
+void bs2b_cross_feed_s24( t_bs2bdp bs2bdp, bs2b_int24_t *sample, int n );
/* sample poits to 24bit signed integers be endians */
-void bs2b_cross_feed_s24be( t_bs2bdp bs2bdp, int24_t *sample, int n );
+void bs2b_cross_feed_s24be( t_bs2bdp bs2bdp, bs2b_int24_t *sample, int n );
/* sample poits to 24bit signed integers little endians */
-void bs2b_cross_feed_s24le( t_bs2bdp bs2bdp, int24_t *sample, int n );
+void bs2b_cross_feed_s24le( t_bs2bdp bs2bdp, bs2b_int24_t *sample, int n );
#ifdef __cplusplus
} /* extern "C" */
diff --git a/src/bs2bclass.cpp b/src/bs2bclass.cpp
index cd0b3e9..2158d9e 100644
--- a/src/bs2bclass.cpp
+++ b/src/bs2bclass.cpp
@@ -143,17 +143,17 @@ void bs2b_base::cross_feed( uint8_t *sample, int n )
bs2b_cross_feed_u8( bs2bdp, sample, n );
}
-void bs2b_base::cross_feed( int24_t *sample, int n )
+void bs2b_base::cross_feed( bs2b_int24_t *sample, int n )
{
bs2b_cross_feed_s24( bs2bdp, sample, n );
}
-void bs2b_base::cross_feed_be( int24_t *sample, int n )
+void bs2b_base::cross_feed_be( bs2b_int24_t *sample, int n )
{
bs2b_cross_feed_s24be( bs2bdp, sample, n );
}
-void bs2b_base::cross_feed_le( int24_t *sample, int n )
+void bs2b_base::cross_feed_le( bs2b_int24_t *sample, int n )
{
bs2b_cross_feed_s24le( bs2bdp, sample, n );
}
diff --git a/src/bs2bclass.h b/src/bs2bclass.h
index c21dcca..8ec25c2 100644
--- a/src/bs2bclass.h
+++ b/src/bs2bclass.h
@@ -51,7 +51,7 @@ public:
void cross_feed( int16_t *sample, int n = 1 );
void cross_feed( int8_t *sample, int n = 1 );
void cross_feed( uint8_t *sample, int n = 1 );
- void cross_feed( int24_t *sample, int n = 1 );
+ void cross_feed( bs2b_int24_t *sample, int n = 1 );
void cross_feed_be( double *sample, int n = 1 );
void cross_feed_be( float *sample, int n = 1 );
@@ -59,7 +59,7 @@ public:
void cross_feed_be( int16_t *sample, int n = 1 );
void cross_feed_be( int8_t *sample, int n = 1 );
void cross_feed_be( uint8_t *sample, int n = 1 );
- void cross_feed_be( int24_t *sample, int n = 1 );
+ void cross_feed_be( bs2b_int24_t *sample, int n = 1 );
void cross_feed_le( double *sample, int n = 1 );
void cross_feed_le( float *sample, int n = 1 );
@@ -67,7 +67,7 @@ public:
void cross_feed_le( int16_t *sample, int n = 1 );
void cross_feed_le( int8_t *sample, int n = 1 );
void cross_feed_le( uint8_t *sample, int n = 1 );
- void cross_feed_le( int24_t *sample, int n = 1 );
+ void cross_feed_le( bs2b_int24_t *sample, int n = 1 );
}; // class bs2b_base
#endif // BS2BCLASS_H
diff --git a/src/bs2btypes.h b/src/bs2btypes.h
index 139cb1e..6cfea60 100644
--- a/src/bs2btypes.h
+++ b/src/bs2btypes.h
@@ -64,13 +64,13 @@ typedef struct
uint8_t octet0;
uint8_t octet1;
int8_t octet2;
-} int24_t;
+} bs2b_int24_t;
typedef struct
{
uint8_t octet0;
uint8_t octet1;
uint8_t octet2;
-} uint24_t;
+} bs2b_uint24_t;
#endif /* BS2BTYPES_H */