Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

aflibConfig.h

Go to the documentation of this file.
00001 /*
00002  * Copyright: (C) 1999-2001 Bruce W. Forsberg
00003  *
00004  *   This library is free software; you can redistribute it and/or
00005  *   modify it under the terms of the GNU Lesser General Public
00006  *   License as published by the Free Software Foundation; either
00007  *   version 2.1 of the License, or any later version.
00008  *
00009  *   This library is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *   Lesser General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU Lesser General Public
00015  *   License along with this library; if not, write to the Free Software
00016  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00017  *
00018  *   Bruce Forsberg  forsberg@tns.net
00019  *
00020  */
00021 
00022 
00023 #ifndef _AFLIBCONFIG_H_
00024 #define _AFLIBCONFIG_H_
00025 
00026 // Note that g++ does not really need this. If -O with compile func in .h will be inline
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

Generated at Tue Aug 7 22:18:05 2001 for Open Source Audio Library Project by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001