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 #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    // Constructor for a node with no parent (ie start of a chain)
00063    aflibAudioFile(
00064       aflibFileType type_enum,
00065       const string& file,
00066       aflibConfig* cfg = NULL,
00067       aflibStatus* status = NULL);
00068 
00069    // Constructor for a node with no parent (ie start of a chain)
00070    aflibAudioFile(
00071       const string& format,
00072       const string& file,
00073       aflibConfig* cfg = NULL,
00074       aflibStatus* status = NULL);
00075 
00076    // Constructor for a node with a parent
00077    aflibAudioFile(
00078       aflibAudio& audio,
00079       aflibFileType type_enum,
00080       const string& file,
00081       aflibConfig* cfg = NULL,
00082       aflibStatus* status = NULL);
00083 
00084    // Constructor for a node with a parent
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

Generated on Wed May 8 20:51:05 2002 for Open Source Audio Library Project by doxygen1.2.15