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