00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _AFLIBAUDIOFILE_H
00024 #define _AFLIBAUDIOFILE_H
00025
00026 #include "aflib.h"
00027 #include "aflibAudio.h"
00028
00029 #include <string>
00030
00031 #ifdef HAVE_CONFIG_H
00032 #include <config.h>
00033 #endif
00034
00053 class aflibConfig;
00054 class aflibFile;
00055
00056 class aflibAudioFile : public aflibAudio {
00057
00058 public:
00059
00060
00061 aflibAudioFile(
00062 aflibFileType type_enum,
00063 const string& file,
00064 aflibConfig* cfg = NULL,
00065 aflibStatus* status = NULL);
00066
00067
00068 aflibAudioFile(
00069 const string& format,
00070 const string& file,
00071 aflibConfig* cfg = NULL,
00072 aflibStatus* status = NULL);
00073
00074
00075 aflibAudioFile(
00076 aflibAudio& audio,
00077 aflibFileType type_enum,
00078 const string& file,
00079 aflibConfig* cfg = NULL,
00080 aflibStatus* status = NULL);
00081
00082
00083 aflibAudioFile(
00084 aflibAudio& audio,
00085 const string& format,
00086 const string& file,
00087 aflibConfig* cfg = NULL,
00088 aflibStatus* status = NULL);
00089
00090 ~aflibAudioFile();
00091
00092 aflibStatus
00093 compute_segment(
00094 list<aflibData *>& data,
00095 long long position = -1) ;
00096
00097 bool
00098 setItem(
00099 const char * item,
00100 const void * value);
00101
00102 bool
00103 getItem(
00104 const char * item,
00105 void * value);
00106
00108 const char *
00109 getName() const { return "aflibAudioFile";};
00110
00111 void
00112 setInputConfig(const aflibConfig& cfg);
00113
00114 const aflibConfig&
00115 getInputConfig() const;
00116
00117 void
00118 setOutputConfig(const aflibConfig& cfg);
00119
00120 const aflibConfig&
00121 getOutputConfig() const;
00122
00123 const string&
00124 getFormat() const;
00125
00126 bool
00127 isDataSizeSupported(aflib_data_size size);
00128
00129 bool
00130 isEndianSupported(aflib_data_endian end);
00131
00132 bool
00133 isSampleRateSupported(int& rate);
00134
00135 bool
00136 isChannelsSupported(int& channels);
00137
00138 protected:
00139
00140 private:
00141
00142 aflibFile * _file_object;
00143 bool _has_parent;
00144
00145 };
00146
00147
00148 #endif