caudio/Headers/cOggAudioDecoderFactory.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

33 lines
668 B
C++

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