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