4c76942a7f
Added a convenience function (move()) to the cAudio source, making it easier to move a source and do velocity for doppler effects with a single call. Internally, audio sources are now stored in an std::vector for better performance. This change also makes it so that it is no longer required for the user to name a source. The user can pass NULL to name to avoid naming it. Some documentation fixes. Added a stress test app, allowing users and developers test how well cAudio performs under pressure.
46 lines
1.7 KiB
C++
46 lines
1.7 KiB
C++
#ifndef ILOGGER_H_INCLUDED
|
|
#define ILOGGER_H_INCLUDED
|
|
|
|
#include "ILogReceiver.h"
|
|
#include "cAudioDefines.h"
|
|
|
|
namespace cAudio
|
|
{
|
|
class ILogger
|
|
{
|
|
public:
|
|
ILogger() { }
|
|
virtual ~ILogger() { }
|
|
|
|
virtual void logCritical( const char* sender, const char *msg, ... ) = 0;
|
|
virtual void logError( const char* sender, const char *msg, ... ) = 0;
|
|
virtual void logWarning( const char* sender, const char *msg, ... ) = 0;
|
|
virtual void logInfo( const char* sender, const char *msg, ... ) = 0;
|
|
virtual void logDebug( const char* sender, const char *msg, ... ) = 0;
|
|
|
|
virtual const LogLevel& getLogLevel() const = 0;
|
|
virtual void setLogLevel( const LogLevel& logLevel ) = 0;
|
|
|
|
//! Register Log Receiver
|
|
//! Note: Any class registered will become owned by the internal thread.
|
|
//! If threading is enabled, you MUST make the receiver threadsafe if you plan to access it in your application while it is registered
|
|
virtual bool registerLogReceiver(ILogReceiver* receiver, const char* name) = 0;
|
|
//!Unregister a Log Receiver
|
|
//!Will NOT delete any user added receiver, you must do that yourself
|
|
virtual void unRegisterLogReceiver(const char* name) = 0;
|
|
//!Returns whether an log receiver is currently registered
|
|
virtual bool isLogReceiverRegistered(const char* name) = 0;
|
|
//!Returns a registered log receiver
|
|
virtual ILogReceiver* getLogReceiver(const char* name) = 0;
|
|
protected:
|
|
private:
|
|
};
|
|
|
|
//! Gets the interface to the logger
|
|
/** Note: This is the only way to get access to the logging capabilities of cAudio.
|
|
\return A pointer to the object
|
|
*/
|
|
CAUDIO_API ILogger* getLogger();
|
|
};
|
|
#endif //! ILOGGER_H_INCLUDED
|