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

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