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

Generated at Sun May 13 16:18:53 2001 for Open Source Audio Library Project by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001