MonoAudioFileReader.hxx

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG)
00003  *                         UNIVERSITAT POMPEU FABRA
00004  *
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 #ifndef MonoAudioFileReader_hxx
00023 #define MonoAudioFileReader_hxx
00024 
00025 #include "Processing.hxx"
00026 #include "MonoAudioFileReaderConfig.hxx"
00027 #include "AudioOutPort.hxx"
00028 #include "AudioFile.hxx"
00029 #include "OutControl.hxx"
00030 #include "OutControl.hxx"
00031 #include "AudioCodecs_Stream.hxx"
00032 
00033 namespace CLAM
00034 {
00035 
00036         class MonoAudioFileReader : public Processing
00037         {
00038         public: 
00039                 MonoAudioFileReader( const ProcessingConfig& cfg = MonoAudioFileReaderConfig() );
00040    
00041                 virtual const char* GetClassName() const;
00042                 virtual const ProcessingConfig& GetConfig() const;
00043                 virtual bool Do( Audio & outputSamples );
00044                 virtual bool Do();
00045                 virtual ~MonoAudioFileReader();
00046                 const AudioFileHeader & GetHeader() const { return mAudioFile.GetHeader(); }
00047                 const AudioTextDescriptors & GetTextDescriptors () const { return mAudioFile.GetTextDescriptors(); }
00048                 const EAudioFileCodec GetCodec() const { return mAudioFile.GetCodec(); }
00049 
00050 
00051         protected: // methods
00052 
00053                 virtual bool ConcreteConfigure( const ProcessingConfig& cfgObject );
00054                 virtual bool ConcreteStart();
00055                 virtual bool ConcreteStop();
00056 
00057         protected: // attributes
00058                 
00059                 MonoAudioFileReaderConfig mConfig;
00060                 AudioFileSource           mAudioFile;
00061                 AudioOutPort              mOutput;
00062                 FloatInControl            mSeekControl;
00063                 FloatOutControl           mTimeOutput;
00064                 OutControl<unsigned long> mFramePositionOutput;
00065                 FloatOutControl           mProgressOutput;
00066                 AudioCodecs::Stream*      mNativeStream;
00067                 bool                      mEOFReached;
00068         };
00069 }
00070 
00071 #endif // MonoAudioFileReader.hxx
00072 
Generated by  doxygen 1.6.3