Comments and documentation.
Incremented the version in preparation for the next release.
This commit is contained in:
parent
6fac7af3ed
commit
3b8704444a
|
@ -1,5 +1,5 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.0.0 Tutorial 1
|
||||
//cAudio 2.1.0 Tutorial 1
|
||||
//Basic 2d Audio
|
||||
//****************************************************************
|
||||
|
||||
|
@ -14,7 +14,7 @@ using namespace std;
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.0.0 Tutorial 1: Basic 2D Audio. \n \n";
|
||||
cout << "cAudio 2.1.0 Tutorial 1: Basic 2D Audio. \n \n";
|
||||
|
||||
//Create an uninitialized Audio Manager
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager(false);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.0.0 Tutorial 2
|
||||
//cAudio 2.1.0 Tutorial 2
|
||||
//Basic 3d Audio. Moving Audio source. Must be mono sound source
|
||||
//****************************************************************
|
||||
|
||||
|
@ -15,7 +15,7 @@ using namespace std;
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.0.0 Tutorial 2: Basic 3D Audio. \n \n";
|
||||
cout << "cAudio 2.1.0 Tutorial 2: Basic 3D Audio. \n \n";
|
||||
//Hold audio source x position
|
||||
float rot = 0;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.0.0 Tutorial 3
|
||||
//cAudio 2.1.0 Tutorial 3
|
||||
//Basic Memory Playback *Virtual file systems*
|
||||
//bling.h created with bin2h http://deadnode.org/sw/bin2h/
|
||||
//****************************************************************
|
||||
|
@ -18,7 +18,7 @@ using namespace std;
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.0.0 Tutorial 3: Memory Playback. \n \n";
|
||||
cout << "cAudio 2.1.0 Tutorial 3: Memory Playback. \n \n";
|
||||
|
||||
//Create an uninitialized Audio Manager
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager(false);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.0.0 Tutorial 4
|
||||
//cAudio 2.1.0 Tutorial 4
|
||||
//Audio Capture and playback
|
||||
//****************************************************************
|
||||
|
||||
|
@ -17,7 +17,7 @@ const cAudio::AudioFormats CAPTURE_FORMAT = cAudio::EAF_16BIT_MONO;
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "\ncAudio 2.0.0 Tutorial 4: Capturing Audio. \n \n";
|
||||
cout << "\ncAudio 2.1.0 Tutorial 4: Capturing Audio. \n \n";
|
||||
|
||||
std::string formatName;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.0.0 Tutorial 5
|
||||
//cAudio 2.1.0 Tutorial 5
|
||||
//Audio effects
|
||||
//****************************************************************
|
||||
|
||||
|
@ -14,7 +14,7 @@ using namespace std;
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.0.0 Tutorial 5: Basic Audio Effects. \n \n";
|
||||
cout << "cAudio 2.1.0 Tutorial 5: Basic Audio Effects. \n \n";
|
||||
|
||||
//Create an uninitialized Audio Manager
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager(false);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.0.0 Tutorial 6
|
||||
//cAudio 2.1.0 Tutorial 6
|
||||
//Custom Event Handler
|
||||
//****************************************************************
|
||||
|
||||
|
@ -17,7 +17,7 @@ using namespace std;
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.0.0 Tutorial 6: Custom event handler. \n \n";
|
||||
cout << "cAudio 2.1.0 Tutorial 6: Custom event handler. \n \n";
|
||||
|
||||
//Create an uninitialized Audio Manager
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager(false);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//****************************************************************
|
||||
//cAudio 2.0.0 Tutorial 7
|
||||
//cAudio 2.1.0 Tutorial 7
|
||||
//Custom log receiver
|
||||
//****************************************************************
|
||||
|
||||
|
@ -17,7 +17,7 @@ using namespace std;
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.0.0 Tutorial 7: Custom log recevier. \n \n";
|
||||
cout << "cAudio 2.1.0 Tutorial 7: Custom log recevier. \n \n";
|
||||
|
||||
//Create an uninitialized Audio Manager
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager(false);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
namespace cAudio
|
||||
{
|
||||
//! Overrides the memory allocations for classes derived from it and makes them use the cAudio memory system
|
||||
class cMemoryOverride
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
namespace cAudio
|
||||
{
|
||||
//! Tracks all allocations that go through cAudio's memory system and keeps statistics on it
|
||||
class cMemoryTracker
|
||||
{
|
||||
public:
|
||||
|
@ -24,7 +25,10 @@ namespace cAudio
|
|||
return &Singleton;
|
||||
}
|
||||
|
||||
//! Adds an allocation to be tracked
|
||||
void AddAllocation(void* pointer, size_t size, const char* filename, int line, const char* function);
|
||||
|
||||
//! Removes a previously tracked allocation (for when it has been deallocated)
|
||||
void RemoveAllocation(void* pointer);
|
||||
|
||||
private:
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
namespace cAudio
|
||||
{
|
||||
#ifdef CAUDIO_REROUTE_STL_ALLOCATIONS
|
||||
//! Reroutes allocations from STL containers into cAudio's memory system
|
||||
template <typename T> class cSTLAllocator
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <cstring>
|
||||
namespace cAudio
|
||||
{
|
||||
//! Memory provider that wraps the standard memalloc and free
|
||||
class cStandardMemoryProvider : public IMemoryProvider
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -9,8 +9,21 @@ namespace cAudio
|
|||
class IMemoryProvider
|
||||
{
|
||||
public:
|
||||
//! Allocates memory and returns a pointer to it.
|
||||
/**
|
||||
\param size: Size of the memory chunk to allocate in bytes.
|
||||
\param filename: Filename of the source file that this allocation took place in (in Debug) or NULL otherwise.
|
||||
\param line: Line of the source file where this allocation took place (in Debug) or -1 otherwise.
|
||||
\param function: Function that this allocation took place in (in Debug) or NULL otherwise.
|
||||
\return Pointer to the allocated memory or NULL if allocation failed. */
|
||||
virtual void* Allocate(size_t size, const char* filename, int line, const char* function) = 0;
|
||||
|
||||
//! Frees memory previously allocated.
|
||||
/**
|
||||
\param pointer: Pointer to the memory location to free. */
|
||||
virtual void Free(void* pointer) = 0;
|
||||
|
||||
//! Returns the largest possible single allocation that can be made.
|
||||
virtual size_t getMaxAllocationSize() = 0;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#ifndef IREFCOUNTED_H
|
||||
#define IREFCOUNTED_H
|
||||
|
||||
#include "../include/cAudioMemory.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
//! Applies reference counting to certain cAudio objects.
|
||||
|
@ -26,7 +28,7 @@ namespace cAudio
|
|||
--RefCount;
|
||||
if (RefCount < 1)
|
||||
{
|
||||
delete this;
|
||||
CAUDIO_DELETE this;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -46,13 +46,13 @@
|
|||
#include "IPluginManager.h"
|
||||
#include "IRefCounted.h"
|
||||
|
||||
/*! \mainpage cAudio 2.0.0 API documentation
|
||||
/*! \mainpage cAudio 2.1.0 API documentation
|
||||
*
|
||||
* <img src="../cAudioLogo.jpg"></img>
|
||||
*
|
||||
* \section intro Introduction
|
||||
*
|
||||
* Welcome to the Main API Documentation for cAudio 2.0.0. cAudio is an advanced C++ wrapper around OpenAL, a professional and powerful
|
||||
* Welcome to the Main API Documentation for cAudio 2.1.0. cAudio is an advanced C++ wrapper around OpenAL, a professional and powerful
|
||||
* audio library. Thus cAudio provides you with a number of classes to allow you to easily manipulate your audio world and
|
||||
* intergrate audio effects like reverberation, doppler, attenuation, ect. cAudio also has a plugin system, allowing developers to extend
|
||||
* the functionality of the library. Furthermore, cAudio is released under the zlib license, meaning it is free for you to use in your projects,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
//! Global define for the version of cAudio.
|
||||
//! This is used primarily by plugins to make sure they are linking to the right library.
|
||||
#define CAUDIO_VERSION "2.0.0"
|
||||
#define CAUDIO_VERSION "2.1.0"
|
||||
|
||||
#if !defined( CAUDIO_DEBUG )
|
||||
#if defined( DEBUG ) || defined( _DEBUG )
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
namespace cAudio
|
||||
{
|
||||
//! Returns a pointer to the memory provider of cAudio
|
||||
/** Used by cAudio for all allocations of memory
|
||||
\return A pointer to the memory provider */
|
||||
CAUDIO_API IMemoryProvider* getMemoryProvider();
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//****************************************************************
|
||||
//cAudio 1.7.1 Stress Test
|
||||
//cAudio 2.1.0 Stress Test
|
||||
//Used to push cAudio to its limits
|
||||
//****************************************************************
|
||||
|
||||
|
@ -30,7 +30,7 @@ inline float getRandomFloat(float fMin, float fMax)
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.0.0 Stress Test \n \n";
|
||||
cout << "cAudio 2.1.0 Stress Test \n \n";
|
||||
srand(time(NULL));
|
||||
|
||||
unsigned int startTick = clock();
|
||||
|
|
Loading…
Reference in New Issue