00001 00004 #if !defined(ALAW_H__) 00005 #define ALAW_H__ 00006 00007 00011 class Alaw 00012 { 00013 public: 00014 static void conv_u8bit_alaw(unsigned char *src_ptr, unsigned char *dst_ptr, size_t size); 00015 static void conv_s8bit_alaw(unsigned char *src_ptr, unsigned char *dst_ptr, size_t size); 00016 static void conv_s16bit_alaw(unsigned short *src_ptr, unsigned char *dst_ptr, size_t size); 00017 static void conv_u16bit_alaw(unsigned short *src_ptr, unsigned char *dst_ptr, size_t size); 00018 private: 00019 static inline unsigned char linear2alaw(int pcm_val); 00020 static inline int search(int val, const short *table, int size); 00021 }; 00022 00023 #endif // ALAW_H__ 00024 00025