00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00030 #ifndef _AFLIBSOXFILE_H
00031 #define _AFLIBSOXFILE_H
00032
00033 #ifdef HAVE_CONFIG_H
00034 #include <config.h>
00035 #endif
00036
00037
00038 #include <map>
00039 #include <list>
00040
00041 #include "aflibFile.h"
00042 #include <st.h>
00043
00044 class aflibFileItem;
00045 class aflibSoxFile : public aflibFile {
00046
00047 public:
00048
00049 aflibSoxFile();
00050
00051 ~aflibSoxFile();
00052
00053
00054 aflibStatus
00055 afopen(
00056 const char * file,
00057 aflibConfig* cfg);
00058
00059 aflibStatus
00060 afcreate(
00061 const char * file,
00062 const aflibConfig& cfg);
00063
00064 aflibStatus
00065 afread(
00066 aflibData& data,
00067 long long position = -1);
00068
00069 aflibStatus
00070 afwrite(
00071 aflibData& data,
00072 long long position = -1);
00073
00074 bool
00075 isDataSizeSupported(aflib_data_size size);
00076
00077 bool
00078 isEndianSupported(aflib_data_endian end);
00079
00080 bool
00081 isSampleRateSupported(int& rate);
00082
00083 bool
00084 isChannelsSupported(int& channels);
00085
00086
00087 bool
00088 getItem(
00089 const char* item,
00090 void* value);
00091
00092 private:
00093
00094 static
00095 int filetype(int fd);
00096
00097
00098
00099
00100
00101
00102 static void
00103 configToFormat(
00104 const aflibConfig& cfg,
00105 ft_t format
00106 );
00107 static void
00108 formatToConfig(
00109 aflibConfig& cfg,
00110 const ft_t format
00111 );
00112
00113 void
00114 checkformat(ft_t format){
00115 st_checkformat(format);
00116 };
00117
00118
00119 struct st_soundstream _st_format;
00120 bool _write;
00121 long long _position;
00122
00123 };
00124
00125
00126 #endif