00001 #ifndef __LIBST_H__
00002 #define __LIBST_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #define MINLIN -32768
00018 #define MAXLIN 32767
00019 #define LINCLIP(x) do { if ( x < MINLIN ) x = MINLIN ; else if ( x > MAXLIN ) x = MAXLIN; } while ( 0 )
00020
00021
00022
00023 #ifdef FAST_ULAW_CONVERSION
00024 extern int ulaw_exp_table[256];
00025 extern unsigned char ulaw_comp_table[16384];
00026 #define st_ulaw_to_linear(ulawbyte) ulaw_exp_table[ulawbyte]
00027 #define st_linear_to_ulaw(linearword) ulaw_comp_table[(linearword / 4) & 0x3fff]
00028 #else
00029 unsigned char st_linear_to_ulaw( int sample );
00030 int st_ulaw_to_linear( unsigned char ulawbyte );
00031 #endif
00032
00033 #ifdef FAST_ALAW_CONVERSION
00034 extern int Alaw_exp_table[256];
00035 extern unsigned char Alaw_comp_table[16384];
00036 #define st_Alaw_to_linear(Alawbyte) Alaw_exp_table[Alawbyte]
00037 #define st_linear_to_Alaw(linearword) Alaw_comp_table[(linearword / 4) & 0x3fff]
00038 #else
00039 unsigned char st_linear_to_Alaw( int sample );
00040 int st_Alaw_to_linear( unsigned char ulawbyte );
00041 #endif
00042
00043 #ifdef USG
00044 #define setbuffer(x,y,z)
00045 #endif
00046
00047 #endif