cOggDecoder.h

00001 // Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
00002 // This file is part of the "cAudio Engine"
00003 // For conditions of distribution and use, see copyright notice in cAudio.h
00004 
00005 #ifndef COGGDECODER_H_INCLUDED
00006 #define COGGDECODER_H_INCLUDED
00007 
00008 #include "../include/cAudioDefines.h"
00009 
00010 #ifdef CAUDIO_COMPILE_WITH_OGG_DECODER
00011 
00012 #include "../include/IAudioDecoder.h"
00013 #include <ogg/ogg.h>
00014 #include <vorbis/codec.h>
00015 #include <vorbis/vorbisenc.h>
00016 #include <vorbis/vorbisfile.h>
00017 
00018 namespace cAudio
00019 {
00020 
00021     class cOggDecoder : public IAudioDecoder
00022     {
00023         public:
00024 
00025             cOggDecoder(IDataSource* stream);
00026             ~cOggDecoder();
00027 
00028             virtual AudioFormats getFormat();
00029             virtual int getFrequency();
00030             virtual bool isSeekingSupported();
00031                         virtual bool isValid();
00032             virtual int readAudioData(void* output, int amount);
00033             virtual bool setPosition(int position, bool relative);
00034             virtual bool seek(float seconds,bool relative);
00035                         virtual float getTotalTime();
00036                         virtual int getTotalSize();
00037                         virtual int getCompressedSize();
00038                         virtual float getCurrentTime();
00039                         virtual int getCurrentPosition();
00040                         virtual int getCurrentCompressedPosition();
00041 
00042         protected:
00044             ov_callbacks vorbisCallbacks;
00046             vorbis_info* vorbisInfo;
00048             vorbis_comment* vorbisComment;
00050             OggVorbis_File oggStream; 
00051                         bool Valid;
00052     };
00053 
00054 }
00055 
00056 #endif
00057 
00058 #endif 
 All Classes Namespaces Functions Variables Enumerations

Generated on Sat Feb 20 22:55:07 2010 for cAudio by  doxygen 1.6.2