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 COGGAUDIODECODERFACTORY_H 00006 #define COGGAUDIODECODERFACTORY_H 00007 00008 #include "../include/IAudioDecoderFactory.h" 00009 #include "cOggDecoder.h" 00010 #include "../Headers/cMutex.h" 00011 00012 #ifdef CAUDIO_COMPILE_WITH_OGG_DECODER 00013 00014 namespace cAudio 00015 { 00016 00017 class cOggAudioDecoderFactory : public IAudioDecoderFactory 00018 { 00019 public: 00020 cOggAudioDecoderFactory() {} 00021 ~cOggAudioDecoderFactory() {} 00022 00023 IAudioDecoder* CreateAudioDecoder(IDataSource* stream) 00024 { 00025 Mutex.lock(); 00026 IAudioDecoder* decoder = new cOggDecoder(stream); 00027 Mutex.unlock(); 00028 return decoder; 00029 } 00030 00031 protected: 00032 cAudioMutex Mutex; 00033 private: 00034 }; 00035 00036 }; 00037 00038 #endif 00039 00040 #endif
1.6.2