00001 #ifndef NOATUN_CONVERT_H
00002 #define NOATUN_CONVERT_H
00003
00004
00005
00006
00007 namespace Conversion
00008 {
00009
00010
00011
00012 void convertMono8ToFloat(unsigned long samples, unsigned char *from, float *to);
00013
00014
00015
00016 void interpolateMono8ToFloat(unsigned long samples, double start, double speed,
00017 unsigned char *from, float *to);
00018
00019
00020
00021
00022 void convertMono16leToFloat(unsigned long samples, unsigned char *from, float *to);
00023
00024
00025
00026
00027 void interpolateMono16leToFloat(unsigned long samples, double startpos, double speed,
00028 unsigned char *from, float *to);
00029
00030
00031
00032
00033 void convertStereoI8To2Float(unsigned long samples, unsigned char *from,
00034 float *left, float *right);
00035
00036
00037
00038
00039
00040 void interpolateStereoI8To2Float(unsigned long samples, double startpos, double speed,
00041 unsigned char *from, float *left, float *right);
00042
00043
00044
00045 void convertStereoI16leTo2Float(unsigned long samples, unsigned char *from, float *left,
00046 float *right);
00047
00048
00049
00050
00051
00052 void interpolateStereoI16leTo2Float(unsigned long samples, double startpos, double speed,
00053 unsigned char *from, float *left, float *right);
00054
00055
00056
00057
00058 void interpolateMonoFloatToFloat(unsigned long samples, double startpos, double speed,
00059 float *from, float *to);
00060
00061
00062
00063
00064 void convertStereoIFloatTo2Float(unsigned long samples, float *from, float *left,
00065 float *right);
00066
00067
00068
00069
00070 void interpolateStereoIFloatTo2Float(unsigned long samples, double startpos,
00071 double speed, float *from, float *left,
00072 float *right);
00073
00074
00075
00076
00077 void convertMonoFloatTo16le(unsigned long samples, float *from, unsigned char *to);
00078
00079
00080
00081
00082 void convertStereo2FloatToI16le(unsigned long samples, float *left, float *right,
00083 unsigned char *to);
00084
00085
00086
00087
00088 void convertMonoFloatTo8(unsigned long samples, float *from, unsigned char *to);
00089
00090
00091
00092
00093 void convertStereo2FloatToI8(unsigned long samples, float *left, float *right,
00094 unsigned char *to);
00095
00096
00097
00098
00099
00100 inline void toLittleEndian(unsigned long len, char *buffer);
00101
00102
00103
00104
00105
00106 inline void toBigEndian(unsigned long len, char *buffer);
00107
00108
00109
00110
00111
00112 void swapEndian(unsigned long length, char *buffer);
00113
00114
00115 }
00116
00117
00118 #endif
00119