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

input_mp3.h

Go to the documentation of this file.
00001 #ifndef INPUT_MP3_H
00002 #define INPUT_MP3_H
00003 
00004 #include <mpegsound.h>
00005 #include "audiere.h"
00006 #include "types.h"
00007 #include "utility.h"
00008 
00009 namespace audiere {
00010 
00011   class MP3InputStream : public UnseekableSource, public Soundplayer {
00012   public:
00013     MP3InputStream();
00014     ~MP3InputStream();
00015 
00016     bool initialize(File* file);
00017 
00018     void ADR_CALL getFormat(
00019       int& channel_count,
00020       int& sample_rate,
00021       SampleFormat& sample_format);
00022     int ADR_CALL read(int frame_count, void* samples);
00023     void ADR_CALL reset();
00024 
00025     bool initialize(char* filename);
00026     bool setsoundtype(int stereo, int samplesize, int speed);
00027     bool putblock(void *buffer,int size);
00028 
00029   private:
00030     RefPtr<File> m_file;
00031 
00032     // from format chunk
00033     int m_channel_count;
00034     int m_sample_rate;
00035     SampleFormat m_sample_format;
00036 
00037     Mpegtoraw* m_decoder;
00038     Soundinputstream* m_loader;
00039     
00040     QueueBuffer m_buffer;
00041   };
00042 
00043 }
00044 
00045 #endif

Generated on Sat Oct 12 01:43:03 2002 for audiere by doxygen1.2.17