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

input_ogg.hpp

Go to the documentation of this file.
00001 #ifndef INPUT_OGG_HPP
00002 #define INPUT_OGG_HPP
00003 
00004 
00005 #include <vorbis/vorbisfile.h>
00006 #include "input.hpp"
00007 
00008 
00009 class OGGInputStream : public ISampleSource
00010 {
00011 public:
00012   OGGInputStream();
00013   ~OGGInputStream();
00014 
00015   bool Initialize(IFile* file);
00016 
00017   void GetFormat(
00018     int& channel_count,
00019     int& sample_rate,
00020     int& bits_per_sample);
00021   int Read(int sample_count, void* samples);
00022   bool Reset();
00023 
00024 private:
00025   static size_t FileRead(void* buffer, size_t size, size_t n, void* opaque);
00026   static int    FileSeek(void* opaque, ogg_int64_t offset, int whence);
00027   static int    FileClose(void* opaque);
00028   static long   FileTell(void* opaque);
00029 
00030 private:
00031   IFile* m_file;
00032 
00033   OggVorbis_File m_vorbis_file;
00034 //  bool           m_eof;
00035 
00036   int m_channel_count;
00037   int m_sample_rate;
00038   int m_bits_per_sample;
00039 };
00040 
00041 
00042 #endif

Generated at Mon Jun 10 02:55:12 2002 for audiere by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001