00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _AFLIBCONFIG_H_
00024 #define _AFLIBCONFIG_H_
00025
00026
00027 #define INLINE inline
00028
00029 #include "aflib.h"
00030
00031
00040 class aflibConfig {
00041
00042 public:
00043
00044 aflibConfig();
00045
00046 aflibConfig(
00047 int num_channels,
00048 aflib_data_size bits_per_sample,
00049 int samples_per_second);
00050
00051 ~aflibConfig();
00052
00054 INLINE
00055 int
00056 getChannels() const
00057 { return (_channels); };
00058
00060 INLINE
00061 void
00062 setChannels(int channels)
00063 { _channels = channels; };
00064
00066 INLINE
00067 int
00068 getBitsPerSample() const
00069 { return (_bits_per_sample); };
00070
00072 INLINE
00073 aflib_data_size
00074 getSampleSize() const
00075 { return (_sample_size); };
00076
00078 INLINE
00079 void
00080 setSampleSize(aflib_data_size bits_per_sample)
00081 { _sample_size = bits_per_sample; _bits_per_sample = returnBitsPerSample(_sample_size); };
00082
00084 INLINE
00085 int
00086 getSamplesPerSecond() const
00087 { return (_samples_per_second); };
00088
00090 INLINE
00091 void
00092 setSamplesPerSecond(int samples_per_second)
00093 { _samples_per_second = samples_per_second; };
00094
00096 INLINE
00097 aflib_data_orientation
00098 getDataOrientation() const
00099 { return (_data_orientation); };
00100
00102 INLINE
00103 void
00104 setDataOrientation(aflib_data_orientation data_orientation)
00105 { _data_orientation = data_orientation; };
00106
00108 INLINE
00109 aflib_data_endian
00110 getDataEndian() const
00111 { return (_data_endian); };
00112
00114 INLINE
00115 void
00116 setDataEndian(aflib_data_endian data_endian)
00117 { _data_endian = data_endian; };
00118
00120 INLINE
00121 long long
00122 getTotalSamples() const
00123 { return(_total_size); };
00124
00126 INLINE
00127 void
00128 setTotalSamples(long long total)
00129 { _total_size = total; };
00130
00131 private:
00132
00133 int
00134 returnBitsPerSample(aflib_data_size size);
00135
00136 int _channels;
00137 int _bits_per_sample;
00138 aflib_data_size _sample_size;
00139 int _samples_per_second;
00140 aflib_data_orientation _data_orientation;
00141 aflib_data_endian _data_endian;
00142 long long _total_size;
00143
00144 };
00145
00146
00147 #endif