caudio/Headers/cWavAudioDecoderFacotry.h
Joshua Jones 75ece68dcf Added cross-platform Mutex and Thread classes.
Made cAudio, cAudioCapture, cAudioManager and other classes thread safe.
Made cAudioManager use a seperate update thread by default.
Added cAudioSleep, a cross-platform sleep() function
Moved global defines to cAudioDefines
Added defines to disable thread safety or the internal update thread if the user wishes it
Updated tutorials to reflect the changes made
2009-08-29 11:24:31 +00:00

32 lines
693 B
C++

#ifndef CWAVAUDIODECODERFACOTRY_H_INCLUDED
#define CWAVAUDIODECODERFACOTRY_H_INCLUDED
#include "../include/IAudioDecoderFactory.h"
#include "cWavDecoder.h"
#include "../Headers/cMutex.h"
namespace cAudio
{
class cWavAudioDecoderFactory : public IAudioDecoderFactory
{
public:
cWavAudioDecoderFactory() {}
~cWavAudioDecoderFactory() {}
IAudioDecoder* CreateAudioDecoder(IDataSource* stream)
{
Mutex.lock();
IAudioDecoder* decoder = new cWavDecoder(stream);
Mutex.unlock();
return decoder;
}
protected:
cAudioMutex Mutex;
private:
};
};
#endif //! CWAVAUDIODECODERFACOTRY_H_INCLUDED