* Use "#pragma once" instead ordinary include guards

* Remove redundant mutex locking in DecoderFactories (the access is already locked by the callee)
This commit is contained in:
Murat Suri 2011-05-29 18:33:24 +00:00
parent 21ab759676
commit f3cee669d5
56 changed files with 135 additions and 351 deletions

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CAUDIOCAPTURE_H
#define CAUDIOCAPTURE_H
#pragma once
#include "../include/IAudioCapture.h"
#include <al.h>
@ -93,6 +92,4 @@ namespace cAudio
ALenum convertAudioFormatEnum(AudioFormats format);
void signalEvent(Events sevent);
};
};
#endif //! CAUDIOCAPTURE_H
};

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CAUDIOEFFECTS_H
#define CAUDIOEFFECTS_H
#pragma once
#ifdef CAUDIO_EFX_ENABLED
@ -86,6 +85,4 @@ namespace cAudio
};
};
#endif
#endif //! CAUDIOEFFECTS_H
#endif

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CAUDIOMANAGER_H_INCLUDED
#define CAUDIOMANAGER_H_INCLUDED
#pragma once
#include "cAudioSource.h"
#include "../include/IAudioDecoderFactory.h"
@ -125,4 +124,3 @@ namespace cAudio
};
}
#endif //! CAUDIOMANAGER_H_INCLUDED

View File

@ -2,8 +2,8 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CAUDIOSOURCE_H_INCLUDED
#define CAUDIOSOURCE_H_INCLUDED
#pragma once
#include <list>
#include <string>
#include <vector>
@ -181,4 +181,3 @@ namespace cAudio
#endif
};
};
#endif //! CAUDIOSOURCE_H_INCLUDED

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CCONSOLELOGRECEIVER_H_INCLUDED
#define CCONSOLELOGRECEIVER_H_INCLUDED
#pragma once
#include "../include/ILogReceiver.h"
#include "../include/cAudioDefines.h"
@ -21,5 +20,3 @@ namespace cAudio
};
#endif
#endif //! CCONSOLELOGRECEIVER_H_INCLUDED

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CEFXFUNCTIONS_H
#define CEFXFUNCTIONS_H
#pragma once
#include "../include/cAudioDefines.h"
@ -189,5 +188,3 @@ namespace cAudio
};
#endif
#endif //! CEFXFUNCTIONS_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CEFFECT_H
#define CEFFECT_H
#pragma once
#ifdef CAUDIO_EFX_ENABLED
@ -122,6 +121,4 @@ namespace cAudio
};
#endif
#endif //! CEFFECT_H
#endif

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CFILELOGRECEIVER_H_INCLUDED
#define CFILELOGERCEIVER_H_INCLUDED
#pragma once
#include "../include/ILogReceiver.h"
#include "../include/cAudioDefines.h"
@ -26,6 +25,4 @@ namespace cAudio
};
};
#endif
#endif //!CFILELOGRECEIVER_H_INCLUDED
#endif

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CFILESOURCE_H
#define CFILESOURCE_H
#pragma once
#include "../include/IDataSource.h"
#include "../include/cAudioDefines.h"
@ -42,4 +41,3 @@ class cFileSource : public IDataSource, public cMemoryOverride
#endif
#endif //! CFILESOURCE_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CFILESOURCEFACTORY_H
#define CFILESOURCEFACTORY_H
#pragma once
#include "../include/IDataSourceFactory.h"
@ -23,7 +22,6 @@ namespace cAudio
virtual IDataSource* CreateDataSource(const char* filename, bool streamingRequested)
{
cAudioMutexBasicLock lock(Mutex);
IDataSource* source = CAUDIO_NEW cFileSource(filename);
if(!streamingRequested && source && source->isValid())
@ -49,12 +47,7 @@ namespace cAudio
}
return source;
}
protected:
cAudioMutex Mutex;
private:
};
};
#endif
#endif //! CFILESOURCEFACTORY_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CFILTER_H
#define CFILTER_H
#pragma once
#ifdef CAUDIO_EFX_ENABLED
@ -63,5 +62,3 @@ namespace cAudio
};
#endif
#endif //! CFILTER_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CLISTENER_H_INCLUDED
#define CLISTENER_H_INCLUDED
#pragma once
#include "../include/IListener.h"
#include "../Headers/cMutex.h"
@ -47,4 +46,3 @@ namespace cAudio
private:
};
}
#endif //! CLISTENER_H_INCLUDED

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CLOGGER_H_INCLUDED
#define CLOGGER_H_INCLUDED
#pragma once
#include <stdarg.h>
@ -46,4 +45,3 @@ namespace cAudio
private:
};
};
#endif //! CLOGGER_H_INCLUDED

View File

@ -1,5 +1,4 @@
#ifndef CMEMORYOVERRIDE_H_INCLUDED
#define CMEMORYOVERRIDE_H_INCLUDED
#pragma once
#include <new>
#include "../include/cAudioMemory.h"
@ -63,4 +62,3 @@ namespace cAudio
};
};
#endif //! CMEMORYOVERRIDE_H_INCLUDED

View File

@ -2,40 +2,34 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CMEMORYSOURCE_H
#define CMEMORYSOURCE_H
#pragma once
#include "../include/IDataSource.h"
#include "../Headers/cMemoryOverride.h"
namespace cAudio
{
//!Class used to read from a memory buffer.
class cMemorySource : public IDataSource, public cMemoryOverride
{
public:
/** Default Constructor
\param data: Pointer to a data buffer to use.
\param size: Size of the target buffer.
\param copy: Whether to copy the buffer or use the provided pointer. On destruct, that pointer will be deleted unless copy is true.
*/
cMemorySource(const void* data, int size, bool copy);
~cMemorySource();
//!Class used to read from a memory buffer.
class cMemorySource : public IDataSource, public cMemoryOverride
{
public:
/** Default Constructor
\param data: Pointer to a data buffer to use.
\param size: Size of the target buffer.
\param copy: Whether to copy the buffer or use the provided pointer. On destruct, that pointer will be deleted unless copy is true.
*/
cMemorySource(const void* data, int size, bool copy);
~cMemorySource();
virtual bool isValid();
virtual int getCurrentPos();
virtual int getSize();
virtual int read(void* output, int size);
virtual bool seek(int amount, bool relative);
protected:
char* Data;
int Size;
bool Valid;
int Pos;
private:
virtual bool isValid();
virtual int getCurrentPos();
virtual int getSize();
virtual int read(void* output, int size);
virtual bool seek(int amount, bool relative);
protected:
char* Data;
int Size;
bool Valid;
int Pos;
};
};
};
#endif //! CMEMORYSOURCE_H

View File

@ -1,5 +1,4 @@
#ifndef CMEMORYTRACKER_H_INCLUDED
#define CMEMORYTRACKER_H_INCLUDED
#pragma once
#include "../include/cAudioDefines.h"
@ -69,6 +68,4 @@ namespace cAudio
};
};
#endif
#endif //! CMEMORYTRACKER_H_INCLUDED
#endif

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CAUDIOMUTEX_H
#define CAUDIOMUTEX_H
#pragma once
#include "../include/cAudioDefines.h"
@ -41,14 +40,10 @@ namespace cAudio
class cAudioMutex
{
public:
cAudioMutex();
~cAudioMutex();
void lock();
void unlock();
private:
void initialize();
bool Initialized;
cAudioMutex() {}
~cAudioMutex() {}
void lock() {}
void unlock() {}
};
#endif
@ -66,6 +61,4 @@ namespace cAudio
protected:
cAudioMutex* Mutex;
};
};
#endif //! CAUDIOMUTEX_H
};

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef COGGAUDIODECODERFACTORY_H
#define COGGAUDIODECODERFACTORY_H
#pragma once
#include "../include/IAudioDecoderFactory.h"
#include "cOggDecoder.h"
@ -13,28 +12,17 @@
namespace cAudio
{
class cOggAudioDecoderFactory : public IAudioDecoderFactory
{
public:
cOggAudioDecoderFactory() {}
~cOggAudioDecoderFactory() {}
class cOggAudioDecoderFactory : public IAudioDecoderFactory
{
public:
cOggAudioDecoderFactory() {}
~cOggAudioDecoderFactory() {}
IAudioDecoder* CreateAudioDecoder(IDataSource* stream)
{
Mutex.lock();
IAudioDecoder* decoder = CAUDIO_NEW cOggDecoder(stream);
Mutex.unlock();
return decoder;
}
protected:
cAudioMutex Mutex;
private:
};
IAudioDecoder* CreateAudioDecoder(IDataSource* stream)
{
return CAUDIO_NEW cOggDecoder(stream);
}
};
};
#endif
#endif //! COGGAUDIODECODERFACTORY_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef COGGDECODER_H_INCLUDED
#define COGGDECODER_H_INCLUDED
#pragma once
#include "../include/cAudioDefines.h"
@ -54,5 +53,3 @@ namespace cAudio
}
#endif
#endif //! COGGDECODER_H_INCLUDED

View File

@ -1,5 +1,4 @@
#ifndef CPLUGINMANAGER_H_INCLUDED
#define CPLUGINMANAGER_H_INCLUDED
#pragma once
#include "../include/IPluginManager.h"
#include "../include/IAudioPlugin.h"
@ -80,6 +79,4 @@ namespace cAudio
};
};
#endif //! CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
#endif //! CPLUGINMANAGER_H_INCLUDED
#endif //! CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CRAWAUDIODECODERFACOTRY_H_INCLUDED
#define CRAWAUDIODECODERFACOTRY_H_INCLUDED
#pragma once
#include "../include/IAudioDecoderFactory.h"
#include "cRawDecoder.h"
@ -11,33 +10,21 @@
namespace cAudio
{
class cRawAudioDecoderFactory : public IAudioDecoderFactory
{
public:
cRawAudioDecoderFactory() {}
~cRawAudioDecoderFactory() {}
class cRawAudioDecoderFactory : public IAudioDecoderFactory
{
public:
cRawAudioDecoderFactory() {}
~cRawAudioDecoderFactory() {}
IAudioDecoder* CreateAudioDecoder(IDataSource* stream)
{
return CAUDIO_NEW cRawDecoder(stream, 22050, EAF_16BIT_MONO);
}
IAudioDecoder* CreateAudioDecoder(IDataSource* stream)
{
Mutex.lock();
IAudioDecoder* decoder = CAUDIO_NEW cRawDecoder(stream, 22050, EAF_16BIT_MONO);
Mutex.unlock();
return decoder;
}
IAudioDecoder* CreateAudioDecoder(IDataSource* stream, unsigned int frequency = 22050, AudioFormats format = EAF_16BIT_MONO)
{
Mutex.lock();
IAudioDecoder* decoder = CAUDIO_NEW cRawDecoder(stream, frequency, format);
Mutex.unlock();
return decoder;
}
protected:
cAudioMutex Mutex;
private:
IAudioDecoder* CreateAudioDecoder(IDataSource* stream, unsigned int frequency = 22050, AudioFormats format = EAF_16BIT_MONO)
{
return CAUDIO_NEW cRawDecoder(stream, frequency, format);
}
};
};
};
#endif //! CRAWAUDIODECODERFACOTRY_H_INCLUDED

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CRAWDECODER_H_INCLUDED
#define CRAWDECODER_H_INCLUDED
#pragma once
#include "../include/IAudioDecoder.h"
#include "../Headers/cMemoryOverride.h"
@ -36,5 +35,3 @@ namespace cAudio
AudioFormats Format;
};
};
#endif //! CRAWDECODER_H_INCLUDED

View File

@ -1,5 +1,4 @@
#ifndef CSTANDARDMEMORYPROVIDER_H_INCLUDED
#define CSTANDARDMEMORYPROVIDER_H_INCLUDED
#pragma once
#include "../include/IMemoryProvider.h"
#include <cstring>
@ -14,5 +13,3 @@ namespace cAudio
virtual size_t getMaxAllocationSize();
};
};
#endif //! CSTANDARDMEMORYPROVIDER_H_INCLUDED

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CAUDIOTHREAD_H
#define CAUDIOTHREAD_H
#pragma once
#include "../include/cAudioDefines.h"
@ -29,6 +28,4 @@ namespace cAudio
static int SpawnThread( void* start_address( void* ), void *arg);
#endif
};
};
#endif //! CAUDIOTHREAD_H
};

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CWAVAUDIODECODERFACOTRY_H_INCLUDED
#define CWAVAUDIODECODERFACOTRY_H_INCLUDED
#pragma once
#include "../include/IAudioDecoderFactory.h"
#include "cWavDecoder.h"
@ -13,27 +12,17 @@
namespace cAudio
{
class cWavAudioDecoderFactory : public IAudioDecoderFactory
{
public:
cWavAudioDecoderFactory() {}
~cWavAudioDecoderFactory() {}
class cWavAudioDecoderFactory : public IAudioDecoderFactory
{
public:
cWavAudioDecoderFactory() {}
~cWavAudioDecoderFactory() {}
IAudioDecoder* CreateAudioDecoder(IDataSource* stream)
{
Mutex.lock();
IAudioDecoder* decoder = CAUDIO_NEW cWavDecoder(stream);
Mutex.unlock();
return decoder;
}
protected:
cAudioMutex Mutex;
private:
};
IAudioDecoder* CreateAudioDecoder(IDataSource* stream)
{
return CAUDIO_NEW cWavDecoder(stream);
}
};
};
#endif
#endif //! CWAVAUDIODECODERFACOTRY_H_INCLUDED

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CWAVDECODER_H_INCLUDED
#define CWAVDECODER_H_INCLUDED
#pragma once
#include "../include/IAudioDecoder.h"
#include "../include/cAudioDefines.h"
@ -49,5 +48,3 @@ namespace cAudio
#endif
#endif //! CFLACDECODER_H_INCLUDED

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef EAUDIOFORMATS_H
#define EAUDIOFORMATS_H
#pragma once
namespace cAudio
{
@ -15,6 +14,4 @@ namespace cAudio
EAF_16BIT_MONO,
EAF_16BIT_STEREO
};
};
#endif //! EAUDIOFORMATS_H
};

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IAUDIOCAPTURE_H
#define IAUDIOCAPTURE_H
#pragma once
#include "EAudioFormats.h"
#include "cAudioDefines.h"
@ -130,6 +129,4 @@ namespace cAudio
\return True if the thread is currently running, false otherwise.
*/
CAUDIO_API bool isAudioCaptureThreadRunning();
};
#endif //! IAUDIOCAPTURE_H
};

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IAUDIODECODER_H
#define IAUDIODECODER_H
#pragma once
#include "IRefCounted.h"
#include "IDataSource.h"
@ -75,5 +74,3 @@ namespace cAudio
IDataSource* Stream;
};
};
#endif //! IAUDIODECODER_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IAUDIODECODERFACTORY_H
#define IAUDIODECODERFACTORY_H
#pragma once
#include "IAudioDecoder.h"
@ -21,9 +20,5 @@ namespace cAudio
\param stream: Data Source to attach to this decoder.
\return A pointer to a decoder instance, or NULL on failure to allocate. */
virtual IAudioDecoder* CreateAudioDecoder(IDataSource* stream) = 0;
protected:
private:
};
};
#endif //! IAUDIODECODERFACTORY_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IAUDIOEFFECTS_H
#define IAUDIOEFFECTS_H
#pragma once
#include "IEffect.h"
#include "IFilter.h"
@ -235,6 +234,4 @@ namespace cAudio
};
};
#endif
#endif //! IAUDIOEFFECTS_H
#endif

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IAUDIOMANAGER_H
#define IAUDIOMANAGER_H
#pragma once
#include "IListener.h"
#include "cAudioDefines.h"
@ -199,4 +198,3 @@ namespace cAudio
*/
CAUDIO_API bool isAudioManagerThreadRunning();
}
#endif //! IAUDIOMANAGER_H

View File

@ -1,5 +1,4 @@
#ifndef IAUDIOPLUGIN_H_INCLUDED
#define IAUDIOPLUGIN_H_INCLUDED
#pragma once
#include "IRefCounted.h"
#include "IAudioManager.h"
@ -49,6 +48,4 @@ namespace cAudio
\param capture: Pointer to the soon to be destroyed capture interface. */
virtual void onDestoryAudioCapture(IAudioCapture* capture) { }
};
};
#endif //! IAUDIOPLUGIN_H_INCLUDED
};

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IAUDIOSOURCE_H
#define IAUDIOSOURCE_H
#pragma once
#include "cAudioDefines.h"
#include "IRefCounted.h"
@ -276,5 +275,4 @@ namespace cAudio
protected:
private:
};
};
#endif //! IAUDIO_H
};

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef ICAPTUREEVENTHANDLER_H
#define ICAPTUREEVENTHANDLER_H
#pragma once
namespace cAudio
{
@ -32,5 +31,3 @@ namespace cAudio
};
};
#endif //! ICAPTUREEVENTHANDLER_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IDATASOURCE_H
#define IDATASOURCE_H
#pragma once
#include "IRefCounted.h"
@ -43,4 +42,3 @@ namespace cAudio
};
};
#endif //! IDATASOURCE_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IDATASOURCEFACTORY_H
#define IDATASOURCEFACTORY_H
#pragma once
#include "IDataSource.h"
@ -27,4 +26,3 @@ namespace cAudio
};
};
#endif //! IDATASOURCEFACTORY_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IEFFECT_H
#define IEFFECT_H
#pragma once
#include "IRefCounted.h"
#include "IFilter.h"
@ -191,5 +190,3 @@ namespace cAudio
};
#endif
#endif //! IEFFECT_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IEFFECTPARAMETERS_H
#define IEFFECTPARAMETERS_H
#pragma once
#include "cVector3.h"
#include "cAudioDefines.h"
@ -814,5 +813,3 @@ namespace cAudio
};
#endif
#endif //! IEFFECTPARAMETERS_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IFILTER_H
#define IFILTER_H
#pragma once
#include "IRefCounted.h"
#include "cAudioDefines.h"
@ -70,5 +69,3 @@ namespace cAudio
};
#endif
#endif //! IFILTER_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef ILISTENER_H
#define ILISTENER_H
#pragma once
#include "cVector3.h"
#include "cAudioDefines.h"
@ -73,9 +72,6 @@ namespace cAudio
//! Returns the meters per user world unit for use with sound effects
virtual float getMetersPerUnit(void) const = 0;
#endif
protected:
private:
};
}
#endif //! ILISTENER_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef ILOGRECEIVER_H_INCLUDED
#define ILOGRECEIVER_H_INCLUDED
#pragma once
namespace cAudio
{
@ -45,4 +44,4 @@ namespace cAudio
virtual bool OnLogMessage(const char* sender, const char* message, LogLevel level, float time) = 0;
};
};
#endif //! ILOGRECEIVER_H_INCLUDED

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef ILOGGER_H_INCLUDED
#define ILOGGER_H_INCLUDED
#pragma once
#include "ILogReceiver.h"
#include "cAudioDefines.h"
@ -78,9 +77,6 @@ namespace cAudio
\param name: Name of the log receiver to return.
\return Pointer to the found log receiver or NULL if it could not be found. */
virtual ILogReceiver* getLogReceiver(const char* name) = 0;
protected:
private:
};
//! Gets the interface to the logger.
@ -89,4 +85,4 @@ namespace cAudio
*/
CAUDIO_API ILogger* getLogger();
};
#endif //! ILOGGER_H_INCLUDED

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IMANAGEREVENTHANDLER_H
#define IMANAGEREVENTHANDLER_H
#pragma once
namespace cAudio
{
@ -31,4 +30,3 @@ namespace cAudio
};
};
#endif //! IMANAGEREVENTHANDLER_H

View File

@ -1,5 +1,4 @@
#ifndef IMEMORYPROVIDER_H_INCLUDED
#define IMEMORYPROVIDER_H_INCLUDED
#pragma once
#include "cAudioDefines.h"
#include <cstring>
@ -27,5 +26,3 @@ namespace cAudio
virtual size_t getMaxAllocationSize() = 0;
};
};
#endif //! IMEMORYPROVIDER_H_INCLUDED

View File

@ -1,5 +1,4 @@
#ifndef IPLUGINMANAGER_H_INCLUDED
#define IPLUGINMANAGER_H_INCLUDED
#pragma once
#include "IAudioPlugin.h"
#include "cAudioDefines.h"
@ -61,5 +60,3 @@ namespace cAudio
};
#endif //! CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
#endif //! IPLUGINMANAGER_H_INCLUDED

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef IREFCOUNTED_H
#define IREFCOUNTED_H
#pragma once
#include "cAudioMemory.h"
@ -44,4 +43,3 @@ namespace cAudio
int RefCount;
};
}
#endif //! IREFCOUNTED_H

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef ISOURCEEVENTHANDLER_H
#define ISOURCEEVENTHANDLER_H
#pragma once
namespace cAudio
{
@ -28,4 +27,3 @@ namespace cAudio
};
};
#endif //! ISOURCEEVENTHANDLER_H

View File

@ -23,8 +23,7 @@
*/
#ifndef CAUDIO_H
#define CAUDIO_H
#pragma once
#include "cAudioDefines.h"
#include "cAudioPlatform.h"
@ -104,8 +103,5 @@
*/
//! Main namespace for the entire cAudio library
namespace cAudio
{
namespace cAudio {
};
#endif

View File

@ -1,5 +1,4 @@
#ifndef CAUDIODEFINES_H
#define CAUDIODEFINES_H
#pragma once
#include "cAudioPlatform.h"
@ -247,5 +246,3 @@
//#define CAUDIO_MEMORYTRACKER_LOG_ALL_ALLOCATIONS
#endif //CAUDIO_PLATFORM_LINUX
#endif //CAUDIODEFINES_H

View File

@ -1,5 +1,4 @@
#ifndef CAUDIOMEMORY_H_INCLUDED
#define CAUDIOMEMORY_H_INCLUDED
#pragma once
#include "cAudioDefines.h"
#include "IMemoryProvider.h"
@ -22,6 +21,4 @@ namespace cAudio
/** Used by cAudio for all allocations of memory
\return A pointer to the memory provider */
CAUDIO_API IMemoryProvider* getMemoryProvider();
};
#endif //! CAUDIOMEMORY_H_INCLUDED
};

View File

@ -1,5 +1,4 @@
#ifndef CAUDIOPLATFORM_H_INCLUDED
#define CAUDIOPLATFORM_H_INCLUDED
#pragma once
#if !defined( CAUDIO_PLATFORM_WIN )
# if defined( WIN32 ) || defined( _WINDOWS ) || defined(_WIN32)
@ -38,5 +37,3 @@
# endif
# endif
#endif
#endif //! CAUDIOPLATFORM_H_INCLUDED

View File

@ -2,8 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#ifndef CAUDIOSLEEP_H
#define CAUDIOSLEEP_H
#pragma once
#include "cAudioDefines.h"
@ -12,6 +11,4 @@ namespace cAudio
//! Causes the current thread to give up control for a certain duration.
/** \param ms: amount of miliseconds to sleep */
CAUDIO_API void cAudioSleep(unsigned int ms);
};
#endif //! CAUDIOSLEEP_H
};

View File

@ -1,5 +1,4 @@
#ifndef CAUDIOSTRING_H_INCLUDED
#define CAUDIOSTRING_H_INCLUDED
#pragma once
#include "cAudioDefines.h"
#include "cAudioPlatform.h"
@ -110,5 +109,3 @@ namespace cAudio
}
#endif
};
#endif //! CAUDIOSTRING_H_INCLUDED

View File

@ -1,5 +1,4 @@
#ifndef CSTLALLOCATOR_H_INCLUDED
#define CSTLALLOCATOR_H_INCLUDED
#pragma once
#include "cAudioDefines.h"
#include "cAudioMemory.h"
@ -130,5 +129,3 @@ namespace cAudio
#endif
};
#endif //! CSTLALLOCATOR_H_INCLUDED

View File

@ -58,30 +58,6 @@ namespace cAudio
#endif
Initialized=true;
}
#else
cAudioMutex::cAudioMutex() : Initialized(false)
{
}
cAudioMutex::~cAudioMutex()
{
//Do nothing
}
void cAudioMutex::lock(void)
{
//Do nothing
}
void cAudioMutex::unlock(void)
{
//Do nothing
}
void cAudioMutex::initialize(void)
{
//Do nothing
}
#endif
};