75ece68dcf
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
33 lines
668 B
C++
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
|