Added additional defines for more control of which components are compiled into the library (for embedded platforms like the IPhone).
This commit is contained in:
parent
199b10fe0d
commit
1e2fe1c54c
|
@ -6,7 +6,9 @@
|
|||
#define CCONSOLELOGRECEIVER_H_INCLUDED
|
||||
|
||||
#include "../include/ILogReceiver.h"
|
||||
#include "../include/cAudioDefines.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
|
@ -17,6 +19,7 @@ namespace cAudio
|
|||
};
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif //! CCONSOLELOGRECEIVER_H_INCLUDED
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
#define CFILELOGERCEIVER_H_INCLUDED
|
||||
|
||||
#include "../include/ILogReceiver.h"
|
||||
#include "../include/cAudioDefines.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
|
@ -24,5 +26,6 @@ namespace cAudio
|
|||
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif //!CFILELOGRECEIVER_H_INCLUDED
|
|
@ -6,8 +6,10 @@
|
|||
#define CFILESOURCE_H
|
||||
|
||||
#include "../include/IDataSource.h"
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include "../include/cAudioDefines.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
|
||||
#include <fstream>
|
||||
|
||||
namespace cAudio
|
||||
|
@ -37,4 +39,6 @@ class cFileSource : public IDataSource
|
|||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! CFILESOURCE_H
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
#define CFILESOURCEFACTORY_H
|
||||
|
||||
#include "../include/IDataSourceFactory.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
|
||||
#include "../Headers/cFileSource.h"
|
||||
#include "../Headers/cMemorySource.h"
|
||||
#include "../Headers/cMutex.h"
|
||||
|
@ -52,4 +55,6 @@ namespace cAudio
|
|||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif //! CFILESOURCEFACTORY_H
|
|
@ -12,7 +12,6 @@
|
|||
#include "../include/IAudioDecoder.h"
|
||||
#include <ogg/ogg.h>
|
||||
#include <vorbis/codec.h>
|
||||
#include <vorbis/vorbisenc.h>
|
||||
#include <vorbis/vorbisfile.h>
|
||||
|
||||
namespace cAudio
|
||||
|
|
|
@ -47,7 +47,9 @@ namespace cAudio
|
|||
|
||||
static cRawAudioDecoderFactory RawDecoderFactory;
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
static cFileSourceFactory FileSourceFactory;
|
||||
#endif
|
||||
|
||||
//Note: OpenAL is threadsafe, so a mutex only needs to protect the class state
|
||||
#ifdef CAUDIO_USE_INTERNAL_THREAD
|
||||
|
@ -741,7 +743,9 @@ namespace cAudio
|
|||
|
||||
manager->registerAudioDecoder(&RawDecoderFactory, "raw");
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
manager->registerDataSource(&FileSourceFactory, "FileSystem", 0);
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
|
||||
std::vector<IAudioPlugin*> plugins = cPluginManager::Instance()->getPluginList();
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cConsoleLogReceiver.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER
|
||||
#include <iostream>
|
||||
|
||||
namespace cAudio
|
||||
|
@ -15,4 +17,6 @@ namespace cAudio
|
|||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cFileLogReceiver.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
|
@ -161,4 +163,8 @@ namespace cAudio
|
|||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3,9 +3,12 @@
|
|||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "../Headers/cFileSource.h"
|
||||
#include <cstring>
|
||||
#include "../Headers/cUtils.h"
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
|
@ -75,3 +78,5 @@ bool cFileSource::seek(int amount, bool relative)
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -12,8 +12,14 @@ namespace cAudio
|
|||
{
|
||||
static cLogger Logger;
|
||||
static bool FirstTimeLogInit(false);
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER
|
||||
static cConsoleLogReceiver ConsoleLog;
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER
|
||||
static cFileLogReceiver FileLog;
|
||||
#endif
|
||||
|
||||
cLogger::cLogger() : StartTime(0), MinLogLevel(ELL_INFO)
|
||||
{
|
||||
|
@ -147,8 +153,12 @@ namespace cAudio
|
|||
if(!FirstTimeLogInit)
|
||||
{
|
||||
FirstTimeLogInit = true;
|
||||
#ifdef CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER
|
||||
Logger.registerLogReceiver(&ConsoleLog, "Console");
|
||||
#endif
|
||||
#ifdef CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER
|
||||
Logger.registerLogReceiver(&FileLog,"File");
|
||||
#endif
|
||||
}
|
||||
return &Logger;
|
||||
}
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
|
||||
#include "../Headers/cMemorySource.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
||||
|
|
|
@ -30,6 +30,12 @@
|
|||
#define CAUDIO_COMPILE_WITH_OGG_DECODER
|
||||
//! This define controls whether the RIFF/Wav decoder is compiled into the library.
|
||||
#define CAUDIO_COMPILE_WITH_WAV_DECODER
|
||||
//! This define controls whether the default filesystem data source is compiled into the library
|
||||
#define CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
//! This define controls whether the default file logger (html) is compiled into the library
|
||||
#define CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER
|
||||
//! This define controls whether the default console logger is compiled into the library
|
||||
#define CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER
|
||||
|
||||
//! This define controls whether plugin support is added into the library, commenting it out will prevent any plugins from working
|
||||
#define CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
|
||||
|
@ -71,6 +77,12 @@
|
|||
#define CAUDIO_COMPILE_WITH_OGG_DECODER
|
||||
//! This define controls whether the RIFF/Wav decoder is compiled into the library.
|
||||
#define CAUDIO_COMPILE_WITH_WAV_DECODER
|
||||
//! This define controls whether the default filesystem data source is compiled into the library
|
||||
#define CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
//! This define controls whether the default file logger (html) is compiled into the library
|
||||
#define CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER
|
||||
//! This define controls whether the default console logger is compiled into the library
|
||||
#define CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER
|
||||
|
||||
//! This define controls whether plugin support is added into the library, commenting it out will prevent any plugins from working
|
||||
#define CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
|
||||
|
@ -109,6 +121,12 @@
|
|||
#define CAUDIO_COMPILE_WITH_OGG_DECODER
|
||||
//! This define controls whether the RIFF/Wav decoder is compiled into the library.
|
||||
#define CAUDIO_COMPILE_WITH_WAV_DECODER
|
||||
//! This define controls whether the default filesystem data source is compiled into the library
|
||||
#define CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
//! This define controls whether the default file logger (html) is compiled into the library
|
||||
#define CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER
|
||||
//! This define controls whether the default console logger is compiled into the library
|
||||
#define CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER
|
||||
|
||||
//! Size of the internal buffer per source for audio data (total amount buffered is CAUDIO_SOURCE_BUFFER_SIZE * CAUDIO_SOURCE_NUM_BUFFERS)
|
||||
#define CAUDIO_SOURCE_BUFFER_SIZE ( 1024 * 64 )
|
||||
|
@ -136,6 +154,12 @@
|
|||
#define CAUDIO_COMPILE_WITH_OGG_DECODER
|
||||
//! This define controls whether the RIFF/Wav decoder is compiled into the library.
|
||||
#define CAUDIO_COMPILE_WITH_WAV_DECODER
|
||||
//! This define controls whether the default filesystem data source is compiled into the library
|
||||
#define CAUDIO_COMPILE_WITH_FILE_SOURCE
|
||||
//! This define controls whether the default file logger (html) is compiled into the library
|
||||
#define CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER
|
||||
//! This define controls whether the default console logger is compiled into the library
|
||||
#define CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER
|
||||
|
||||
//! This define controls whether plugin support is added into the library, commenting it out will prevent any plugins from working
|
||||
#define CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT
|
||||
|
|
Loading…
Reference in New Issue