00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00041 #ifndef _AFLIBDEVFILE_H
00042 #define _AFLIBDEVFILE_H
00043
00044 #ifdef HAVE_CONFIG_H
00045 #include <config.h>
00046 #endif
00047
00048 #include "aflibFile.h"
00049
00050 #define AFLIB_DEV_ITEM_BUFFER "aflib_dev_item_buffer"
00051
00052 class aflibDevFile : public aflibFile {
00053
00054 public:
00055
00056 aflibDevFile();
00057
00058 ~aflibDevFile();
00059
00060 aflibStatus
00061 afopen(
00062 const char * file,
00063 aflibConfig* cfg);
00064
00065 aflibStatus
00066 afcreate(
00067 const char * file,
00068 const aflibConfig& config);
00069
00070 aflibStatus
00071 afread(
00072 aflibData& data,
00073 long long position = -1);
00074
00075 aflibStatus
00076 afwrite(
00077 aflibData& data,
00078 long long position = -1);
00079
00080 bool
00081 setItem(
00082 const char * item,
00083 const void * value);
00084
00085 void
00086 programDevice();
00087
00088 bool
00089 isDataSizeSupported(aflib_data_size size);
00090
00091 bool
00092 isEndianSupported(aflib_data_endian end);
00093
00094 bool
00095 isSampleRateSupported(int& rate);
00096
00097 private:
00098
00099 int
00100 createBuffer(
00101 const aflibConfig& cfg,
00102 double factor);
00103
00104 bool _create_mode;
00105 int _snd_format;
00106 int _snd_stereo;
00107 int _snd_speed;
00108 double _snd_buffer;
00109 int _fd_int;
00110 aflib_data_size _size;
00111 string _file;
00112
00113 };
00114
00115
00116 #endif