* Introduce IAudioDeviceContext and start wrapping OpenAL stuff into cOpenALDeviceContext (its already used for cAudioManager)
* Update C# binding
This commit is contained in:
parent
456fe37358
commit
a38f99589e
|
@ -12,7 +12,7 @@ namespace cAudioPlayer
|
|||
{
|
||||
public partial class MainWnd : Form
|
||||
{
|
||||
private readonly IAudioManager mAudioMgr;
|
||||
private IAudioManager mAudioMgr;
|
||||
private IAudioSource mCurrentSource;
|
||||
private readonly AudioSourceListener mAudioListener;
|
||||
private readonly Timer mUpdateTimer = new Timer();
|
||||
|
@ -22,6 +22,18 @@ namespace cAudioPlayer
|
|||
mAudioMgr = cAudioCSharpWrapper.createAudioManager(true);
|
||||
mAudioListener = new AudioSourceListener(this);
|
||||
mUpdateTimer.Tick += UpdateTimerTick;
|
||||
Closing += MainWnd_Closing;
|
||||
}
|
||||
|
||||
void MainWnd_Closing(object sender, CancelEventArgs e)
|
||||
{
|
||||
if (mCurrentSource != null)
|
||||
{
|
||||
mCurrentSource.unRegisterEventHandler(mAudioListener);
|
||||
mCurrentSource = null;
|
||||
}
|
||||
mAudioMgr.Dispose();
|
||||
mAudioMgr = null;
|
||||
}
|
||||
|
||||
void UpdateTimerTick(object sender, EventArgs e)
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -19,7 +19,7 @@ using namespace std;
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
//Some fancy text
|
||||
cout << "cAudio 2.1.0 Tutorial 5: Basic Audio Effects. \n \n";
|
||||
cout << "cAudio 2.2.0 Tutorial 5: Basic Audio Effects. \n \n";
|
||||
|
||||
//Create an uninitialized Audio Manager
|
||||
cAudio::IAudioManager* manager = cAudio::createAudioManager(false);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "cAudioSource.h"
|
||||
#include "cListener.h"
|
||||
#include "cMutex.h"
|
||||
#include "cAudioEffects.h"
|
||||
|
@ -14,9 +13,7 @@
|
|||
#include "cSTLAllocator.h"
|
||||
#include "cAudioString.h"
|
||||
#include "IThread.h"
|
||||
|
||||
#include <al.h>
|
||||
#include <alc.h>
|
||||
#include "IAudioDeviceContext.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
|
@ -34,7 +31,7 @@ namespace cAudio
|
|||
ON_DATASOURCEREGISTER,
|
||||
};
|
||||
|
||||
cAudioManager() : Device(NULL), Context(NULL), AudioThread(NULL), EFXSupported(false), Initialized(false) { }
|
||||
cAudioManager() : AudioThread(NULL), AudioContext(NULL), Initialized(false) { }
|
||||
virtual ~cAudioManager();
|
||||
|
||||
virtual bool initialize(const char* deviceName = 0x0, int outputFrequency = -1, int eaxEffectSlots = 4);
|
||||
|
@ -66,37 +63,29 @@ namespace cAudio
|
|||
|
||||
virtual IListener* getListener() { return &initlistener; }
|
||||
|
||||
virtual bool isUpdateThreadRunning()
|
||||
{
|
||||
return (AudioThread != NULL && AudioThread->isRunning());
|
||||
}
|
||||
virtual bool isUpdateThreadRunning();
|
||||
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
virtual IAudioEffects* getEffects() { return &initEffects; }
|
||||
virtual IAudioEffects* getEffects();
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual void run();
|
||||
|
||||
IAudioSource* createAudioSource(IAudioDecoder* decoder, const cAudioString& audioName, const cAudioString& dataSource);
|
||||
|
||||
private:
|
||||
//! Mutex for thread syncronization
|
||||
//! Mutex for thread synchronization
|
||||
cAudioMutex Mutex;
|
||||
|
||||
//! An OpenAL context pointer
|
||||
ALCcontext* Context;
|
||||
//! An OpenAL device pointer
|
||||
ALCdevice* Device;
|
||||
|
||||
//! Holds whether EFX is supported
|
||||
bool EFXSupported;
|
||||
|
||||
//! Whether the manager is currently initialized and ready to go.
|
||||
bool Initialized;
|
||||
|
||||
//! Our update thread
|
||||
IThread* AudioThread;
|
||||
|
||||
IAudioDeviceContext* AudioContext;
|
||||
|
||||
//! Holds an index for fast searching of audio sources by name
|
||||
cAudioMap<cAudioString, IAudioSource*>::Type audioIndex;
|
||||
typedef cAudioMap<cAudioString, IAudioSource*>::Type::iterator audioIndexIterator;
|
||||
|
@ -112,12 +101,6 @@ namespace cAudio
|
|||
|
||||
//! The listener object
|
||||
cListener initlistener;
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
//! Interface for audio effects
|
||||
cAudioEffects initEffects;
|
||||
#endif
|
||||
//! Check for OpenAL errors
|
||||
bool checkError();
|
||||
|
||||
//! Signals a event to all event handlers
|
||||
void signalEvent(Events sevent);
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
// Copyright (c) 2008-2011 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones, Murat (wolfmanfx) Sari
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <al.h>
|
||||
#include <alc.h>
|
||||
|
||||
#include "IAudioDeviceContext.h"
|
||||
#include "cMemoryOverride.h"
|
||||
#include "cMutex.h"
|
||||
#include "cAudioEffects.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class cOpenALDeviceContext : public IAudioDeviceContext, public cMemoryOverride
|
||||
{
|
||||
public:
|
||||
cOpenALDeviceContext(IAudioManager* audioManager);
|
||||
virtual ~cOpenALDeviceContext();
|
||||
virtual bool initialize(const char* deviceName, int outputFrequency, int eaxEffectSlots);
|
||||
virtual void shutDown();
|
||||
virtual void update();
|
||||
virtual IAudioManager* getAudioManager() const;
|
||||
virtual IAudioEffects* getEffects() const;
|
||||
ALCcontext* getOpenALContext() const;
|
||||
|
||||
private:
|
||||
|
||||
//! Check for OpenAL errors
|
||||
bool checkError();
|
||||
|
||||
//! Mutex for thread synchronization
|
||||
cAudioMutex Mutex;
|
||||
|
||||
//! An OpenAL context pointer
|
||||
ALCcontext* Context;
|
||||
|
||||
//! An OpenAL device pointer
|
||||
ALCdevice* Device;
|
||||
|
||||
IAudioManager* AudioManager;
|
||||
|
||||
bool Initialized;
|
||||
|
||||
//! Holds whether EFX is supported
|
||||
bool EFXSupported;
|
||||
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
//! Interface for audio effects
|
||||
cAudioEffects initEffects;
|
||||
#endif
|
||||
};
|
||||
}
|
|
@ -24,6 +24,7 @@ set (file_root_header_files
|
|||
Headers/cWavAudioDecoderFactory.h
|
||||
Headers/cWavDecoder.h
|
||||
Headers/cOpenALAudioDeviceList.h
|
||||
Headers/cOpenALDeviceContext.h
|
||||
)
|
||||
set (file_root_include
|
||||
include/cAudio.h
|
||||
|
@ -57,6 +58,7 @@ set (file_root_include
|
|||
include/IPluginManager.h
|
||||
include/IRefCounted.h
|
||||
include/ISourceEventHandler.h
|
||||
include/IAudioDeviceContext.h
|
||||
)
|
||||
set (file_root_util
|
||||
Headers/cUtils.h
|
||||
|
@ -87,6 +89,7 @@ set (file_root_source_files
|
|||
src/cWavDecoder.cpp
|
||||
src/cAudio.cpp
|
||||
src/cOpenALAudioDeviceList.cpp
|
||||
src/cOpenALDeviceContext.cpp
|
||||
)
|
||||
|
||||
if(CAUDIO_ENABLE_OGG)
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
// Copyright (c) 2008-2011 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones, Murat (wolfmanfx) Sari
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
class IAudioManager;
|
||||
class IAudioEffects;
|
||||
|
||||
class IAudioDeviceContext
|
||||
{
|
||||
public:
|
||||
virtual bool initialize(const char* deviceName, int outputFrequency, int eaxEffectSlots) = 0;
|
||||
virtual void shutDown() = 0;
|
||||
virtual void update() = 0;
|
||||
virtual IAudioManager* getAudioManager() const = 0;
|
||||
virtual IAudioEffects* getEffects() const = 0;
|
||||
};
|
||||
}
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "cAudioManager.h"
|
||||
#include "cAudio.h"
|
||||
#include "cAudioSource.h"
|
||||
#include "cAudioPlatform.h"
|
||||
#include "cAudioSleep.h"
|
||||
#include "cUtils.h"
|
||||
|
@ -15,31 +16,13 @@
|
|||
#include "cRawAudioDecoderFactory.h"
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_WIN
|
||||
#include <efx.h>
|
||||
#include <efx-creative.h>
|
||||
#include <xram.h>
|
||||
#endif
|
||||
|
||||
#ifdef CAUDIO_PLATFORM_LINUX
|
||||
#include <AL/alext.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#include "cOpenALDeviceContext.h"
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
cAudioManager::~cAudioManager()
|
||||
{
|
||||
if (AudioThread)
|
||||
{
|
||||
AudioThread->join();
|
||||
delete AudioThread;
|
||||
AudioThread = NULL;
|
||||
}
|
||||
shutDown();
|
||||
}
|
||||
|
||||
bool cAudioManager::initialize(const char* deviceName, int outputFrequency, int eaxEffectSlots)
|
||||
|
@ -49,80 +32,10 @@ namespace cAudio
|
|||
if(Initialized)
|
||||
return false;
|
||||
|
||||
//Stores the context attributes (MAX of 4, with 2 zeros to terminate)
|
||||
ALint attribs[6] = { 0 };
|
||||
AudioContext = CAUDIO_NEW cOpenALDeviceContext(this);
|
||||
|
||||
unsigned int currentAttrib = 0;
|
||||
if(outputFrequency > 0)
|
||||
{
|
||||
attribs[currentAttrib++] = ALC_FREQUENCY;
|
||||
attribs[currentAttrib++] = outputFrequency;
|
||||
}
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
if(eaxEffectSlots > 0)
|
||||
{
|
||||
attribs[currentAttrib++] = ALC_MAX_AUXILIARY_SENDS;
|
||||
attribs[currentAttrib++] = eaxEffectSlots;
|
||||
}
|
||||
#endif
|
||||
|
||||
//Create a new device
|
||||
Device = alcOpenDevice(deviceName);
|
||||
//Check if device can be created
|
||||
if (Device == NULL)
|
||||
{
|
||||
getLogger()->logError("AudioManager", "Failed to Create OpenAL Device.");
|
||||
checkError();
|
||||
if(!AudioContext->initialize(deviceName, outputFrequency, eaxEffectSlots))
|
||||
return false;
|
||||
}
|
||||
|
||||
Context = alcCreateContext(Device, attribs);
|
||||
if (Context == NULL)
|
||||
{
|
||||
getLogger()->logError("AudioManager", "Failed to Create OpenAL Context.");
|
||||
checkError();
|
||||
alcCloseDevice(Device);
|
||||
Device = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!alcMakeContextCurrent(Context))
|
||||
{
|
||||
getLogger()->logError("AudioManager", "Failed to make OpenAL Context current.");
|
||||
checkError();
|
||||
alcDestroyContext(Context);
|
||||
alcCloseDevice(Device);
|
||||
Context = NULL;
|
||||
Device = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
initEffects.getEFXInterface()->Mutex.lock();
|
||||
EFXSupported = initEffects.getEFXInterface()->CheckEFXSupport(Device);
|
||||
initEffects.getEFXInterface()->Mutex.unlock();
|
||||
initEffects.checkEFXSupportDetails();
|
||||
#endif
|
||||
|
||||
getLogger()->logInfo("AudioManager", "OpenAL Version: %s", alGetString(AL_VERSION));
|
||||
getLogger()->logInfo("AudioManager", "Vendor: %s", alGetString(AL_VENDOR));
|
||||
getLogger()->logInfo("AudioManager", "Renderer: %s", alGetString(AL_RENDERER));
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
if(EFXSupported)
|
||||
{
|
||||
int EFXMajorVersion = 0;
|
||||
int EFXMinorVersion = 0;
|
||||
alcGetIntegerv(Device, ALC_EFX_MAJOR_VERSION, 1, &EFXMajorVersion);
|
||||
alcGetIntegerv(Device, ALC_EFX_MINOR_VERSION, 1, &EFXMinorVersion);
|
||||
getLogger()->logInfo("AudioManager", "EFX Version: %i.%i", EFXMajorVersion, EFXMinorVersion);
|
||||
getLogger()->logInfo("AudioManager", "EFX supported and enabled.");
|
||||
}
|
||||
else
|
||||
{
|
||||
getLogger()->logWarning("AudioManager", "EFX is not supported, EFX disabled.");
|
||||
}
|
||||
#endif
|
||||
getLogger()->logInfo("AudioManager", "Supported Extensions: %s", alGetString(AL_EXTENSIONS));
|
||||
|
||||
#ifdef CAUDIO_USE_INTERNAL_THREAD
|
||||
if (!AudioThread)
|
||||
|
@ -135,15 +48,78 @@ namespace cAudio
|
|||
return true;
|
||||
}
|
||||
|
||||
void cAudioManager::shutDown()
|
||||
{
|
||||
if(Initialized)
|
||||
{
|
||||
if (AudioThread) // First wait for our update thread to finish up
|
||||
{
|
||||
AudioThread->join();
|
||||
delete AudioThread;
|
||||
AudioThread = NULL;
|
||||
}
|
||||
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
|
||||
releaseAllSources();
|
||||
|
||||
if (AudioContext)
|
||||
{
|
||||
AudioContext->shutDown();
|
||||
CAUDIO_DELETE AudioContext;
|
||||
AudioContext = NULL;
|
||||
}
|
||||
|
||||
Initialized = false;
|
||||
|
||||
getLogger()->logInfo("AudioManager", "Manager successfully shutdown.");
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioManager::update()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
size_t count = audioSources.size();
|
||||
for(unsigned int i=0; i<count; i++)
|
||||
{
|
||||
IAudioSource* source = audioSources[i];
|
||||
if (source->isValid())
|
||||
{
|
||||
source->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioManager::run()
|
||||
{
|
||||
if(!audioSources.empty())
|
||||
update();
|
||||
|
||||
cAudioSleep(1);
|
||||
}
|
||||
|
||||
bool cAudioManager::isUpdateThreadRunning()
|
||||
{
|
||||
return (AudioThread != NULL && AudioThread->isRunning());
|
||||
}
|
||||
|
||||
IAudioEffects* cAudioManager::getEffects()
|
||||
{
|
||||
if (AudioContext)
|
||||
{
|
||||
return AudioContext->getEffects();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IAudioSource* cAudioManager::createAudioSource(IAudioDecoder* decoder, const cAudioString& audioName, const cAudioString& dataSource)
|
||||
{
|
||||
if(decoder && decoder->isValid())
|
||||
{
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
IAudioSource* audio = CAUDIO_NEW cAudioSource(decoder, Context, initEffects.getEFXInterface());
|
||||
IAudioSource* audio = CAUDIO_NEW cAudioSource(decoder, ((cOpenALDeviceContext*)AudioContext)->getOpenALContext(), ((cAudioEffects*)getEffects())->getEFXInterface());
|
||||
#else
|
||||
IAudioSource* audio = CAUDIO_NEW cAudioSource(decoder, Context);
|
||||
IAudioSource* audio = CAUDIO_NEW cAudioSource(decoder, ((cOpenALDeviceContext*)AudioContext)->getOpenALContext());
|
||||
#endif
|
||||
decoder->drop();
|
||||
|
||||
|
@ -168,8 +144,9 @@ namespace cAudio
|
|||
|
||||
IAudioSource* cAudioManager::create(const char* name, const char* filename, bool stream)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(!Initialized) return NULL;
|
||||
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString audioName = safeCStr(name);
|
||||
cAudioString path = safeCStr(filename);
|
||||
cAudioString ext = getExt(path);
|
||||
|
@ -208,8 +185,9 @@ namespace cAudio
|
|||
|
||||
IAudioSource* cAudioManager::createFromMemory(const char* name, const char* data, size_t length, const char* extension)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
if(!Initialized) return NULL;
|
||||
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString audioName = safeCStr(name);
|
||||
cAudioString ext = safeCStr(extension);
|
||||
IAudioDecoderFactory* factory = getAudioDecoderFactory(ext.c_str());
|
||||
|
@ -237,6 +215,8 @@ namespace cAudio
|
|||
|
||||
IAudioSource* cAudioManager::createFromRaw(const char* name, const char* data, size_t length, unsigned int frequency, AudioFormats format)
|
||||
{
|
||||
if(!Initialized) return NULL;
|
||||
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
cAudioString audioName = safeCStr(name);
|
||||
IAudioDecoderFactory* factory = getAudioDecoderFactory("raw");
|
||||
|
@ -505,78 +485,12 @@ namespace cAudio
|
|||
for(unsigned int i=0; i<audioSources.size(); ++i)
|
||||
{
|
||||
if(source == audioSources[i])
|
||||
{
|
||||
source->drop();
|
||||
{
|
||||
audioSources.erase(audioSources.begin()+i);
|
||||
source->drop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioManager::update()
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
for(unsigned int i=0; i<audioSources.size(); ++i)
|
||||
{
|
||||
IAudioSource* source = audioSources[i];
|
||||
if (source->isValid())
|
||||
{
|
||||
if (source->update())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cAudioManager::shutDown()
|
||||
{
|
||||
if(Initialized)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
releaseAllSources();
|
||||
//Reset context to null
|
||||
alcMakeContextCurrent(NULL);
|
||||
//Delete the context
|
||||
alcDestroyContext(Context);
|
||||
Context = NULL;
|
||||
//Close the device
|
||||
alcCloseDevice(Device);
|
||||
Device = NULL;
|
||||
Initialized = false;
|
||||
getLogger()->logInfo("AudioManager", "Manager successfully shutdown.");
|
||||
}
|
||||
}
|
||||
|
||||
bool cAudioManager::checkError()
|
||||
{
|
||||
int error = alGetError();
|
||||
const char* errorString;
|
||||
|
||||
if (error != AL_NO_ERROR)
|
||||
{
|
||||
errorString = alGetString(error);
|
||||
getLogger()->logError("AudioManager", "OpenAL Error: %s.", errorString);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(Device)
|
||||
{
|
||||
error = alcGetError(Device);
|
||||
if (error != AL_NO_ERROR)
|
||||
{
|
||||
errorString = alGetString(error);
|
||||
getLogger()->logError("AudioManager", "OpenAL Error: %s.", errorString);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void cAudioManager::run()
|
||||
{
|
||||
update();
|
||||
cAudioSleep(1);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -47,20 +47,18 @@ namespace cAudio
|
|||
alGenSources(1, &Source);
|
||||
state = !checkError();
|
||||
}
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
Valid = state && (Decoder != NULL) && (Context != NULL) && (EFX != NULL);
|
||||
#else
|
||||
Valid = state && (Decoder != NULL) && (Context != NULL);
|
||||
#endif
|
||||
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
Valid = state && (Decoder != NULL) && (Context != NULL) && (EFX != NULL);
|
||||
|
||||
int numSlots = 0;
|
||||
ALCdevice* device = alcGetContextsDevice(Context);
|
||||
alcGetIntegerv(device, ALC_MAX_AUXILIARY_SENDS, 1, &numSlots);
|
||||
|
||||
EffectSlotsAvailable = (numSlots <= CAUDIO_SOURCE_MAX_EFFECT_SLOTS) ? numSlots : CAUDIO_SOURCE_MAX_EFFECT_SLOTS;
|
||||
#else
|
||||
Valid = state && (Decoder != NULL) && (Context != NULL);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
cAudioSource::~cAudioSource()
|
||||
|
|
|
@ -0,0 +1,182 @@
|
|||
// Copyright (c) 2008-2011 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones, Murat (wolfmanfx) Sari
|
||||
// This file is part of the "cAudio Engine"
|
||||
// For conditions of distribution and use, see copyright notice in cAudio.h
|
||||
|
||||
#include "cOpenALDeviceContext.h"
|
||||
#include "cAudio.h"
|
||||
#include "cLogger.h"
|
||||
#include "cAudioEffects.h"
|
||||
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
# ifdef CAUDIO_PLATFORM_WIN
|
||||
# include <efx.h>
|
||||
# include <efx-creative.h>
|
||||
# include <xram.h>
|
||||
# elif defined(CAUDIO_PLATFORM_LINUX)
|
||||
# include <AL/alext.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace cAudio
|
||||
{
|
||||
cOpenALDeviceContext::cOpenALDeviceContext(IAudioManager* audioManager) : AudioManager(audioManager), Context(NULL), Device(NULL), Initialized(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
cOpenALDeviceContext::~cOpenALDeviceContext()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool cOpenALDeviceContext::initialize(const char* deviceName, int outputFrequency, int eaxEffectSlots)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
|
||||
if(Initialized)
|
||||
return false;
|
||||
|
||||
//Stores the context attributes (MAX of 4, with 2 zeros to terminate)
|
||||
ALint attribs[6] = { 0 };
|
||||
|
||||
unsigned int currentAttrib = 0;
|
||||
if(outputFrequency > 0)
|
||||
{
|
||||
attribs[currentAttrib++] = ALC_FREQUENCY;
|
||||
attribs[currentAttrib++] = outputFrequency;
|
||||
}
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
if(eaxEffectSlots > 0)
|
||||
{
|
||||
attribs[currentAttrib++] = ALC_MAX_AUXILIARY_SENDS;
|
||||
attribs[currentAttrib++] = eaxEffectSlots;
|
||||
}
|
||||
#endif
|
||||
|
||||
//Create a new device
|
||||
Device = alcOpenDevice(deviceName);
|
||||
//Check if device can be created
|
||||
if (Device == NULL)
|
||||
{
|
||||
getLogger()->logError("AudioManager", "Failed to Create OpenAL Device.");
|
||||
checkError();
|
||||
return false;
|
||||
}
|
||||
|
||||
Context = alcCreateContext(Device, attribs);
|
||||
if (Context == NULL)
|
||||
{
|
||||
getLogger()->logError("AudioManager", "Failed to Create OpenAL Context.");
|
||||
checkError();
|
||||
alcCloseDevice(Device);
|
||||
Device = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!alcMakeContextCurrent(Context))
|
||||
{
|
||||
getLogger()->logError("AudioManager", "Failed to make OpenAL Context current.");
|
||||
checkError();
|
||||
alcDestroyContext(Context);
|
||||
alcCloseDevice(Device);
|
||||
Context = NULL;
|
||||
Device = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
getLogger()->logInfo("AudioManager", "OpenAL Version: %s", alGetString(AL_VERSION));
|
||||
getLogger()->logInfo("AudioManager", "Vendor: %s", alGetString(AL_VENDOR));
|
||||
getLogger()->logInfo("AudioManager", "Renderer: %s", alGetString(AL_RENDERER));
|
||||
|
||||
#if CAUDIO_EFX_ENABLED == 1
|
||||
initEffects.getEFXInterface()->Mutex.lock();
|
||||
EFXSupported = initEffects.getEFXInterface()->CheckEFXSupport(Device);
|
||||
initEffects.getEFXInterface()->Mutex.unlock();
|
||||
initEffects.checkEFXSupportDetails();
|
||||
|
||||
if(EFXSupported)
|
||||
{
|
||||
int EFXMajorVersion = 0;
|
||||
int EFXMinorVersion = 0;
|
||||
alcGetIntegerv(Device, ALC_EFX_MAJOR_VERSION, 1, &EFXMajorVersion);
|
||||
alcGetIntegerv(Device, ALC_EFX_MINOR_VERSION, 1, &EFXMinorVersion);
|
||||
getLogger()->logInfo("AudioManager", "EFX Version: %i.%i", EFXMajorVersion, EFXMinorVersion);
|
||||
getLogger()->logInfo("AudioManager", "EFX supported and enabled.");
|
||||
}
|
||||
else
|
||||
{
|
||||
getLogger()->logWarning("AudioManager", "EFX is not supported, EFX disabled.");
|
||||
}
|
||||
#endif
|
||||
getLogger()->logInfo("AudioManager", "Supported Extensions: %s", alGetString(AL_EXTENSIONS));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void cOpenALDeviceContext::shutDown()
|
||||
{
|
||||
if(Initialized)
|
||||
{
|
||||
cAudioMutexBasicLock lock(Mutex);
|
||||
//Reset context to null
|
||||
alcMakeContextCurrent(NULL);
|
||||
//Delete the context
|
||||
alcDestroyContext(Context);
|
||||
Context = NULL;
|
||||
//Close the device
|
||||
alcCloseDevice(Device);
|
||||
checkError();
|
||||
|
||||
Device = NULL;
|
||||
Initialized = false;
|
||||
}
|
||||
}
|
||||
|
||||
void cOpenALDeviceContext::update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
IAudioManager* cOpenALDeviceContext::getAudioManager() const
|
||||
{
|
||||
return AudioManager;
|
||||
}
|
||||
|
||||
IAudioEffects* cOpenALDeviceContext::getEffects() const
|
||||
{
|
||||
if(EFXSupported)
|
||||
return (IAudioEffects*)&initEffects;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ALCcontext* cOpenALDeviceContext::getOpenALContext() const
|
||||
{
|
||||
return Context;
|
||||
}
|
||||
|
||||
bool cOpenALDeviceContext::checkError()
|
||||
{
|
||||
int error = alGetError();
|
||||
const char* errorString;
|
||||
|
||||
if (error != AL_NO_ERROR)
|
||||
{
|
||||
errorString = alGetString(error);
|
||||
getLogger()->logError("AudioManager", "OpenAL Error: %s.", errorString);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(Device)
|
||||
{
|
||||
error = alcGetError(Device);
|
||||
if (error != AL_NO_ERROR)
|
||||
{
|
||||
errorString = alGetString(error);
|
||||
getLogger()->logError("AudioManager", "OpenAL Error: %s.", errorString);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.4
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace cAudio {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class IAudioDeviceContext : IDisposable {
|
||||
private HandleRef swigCPtr;
|
||||
protected bool swigCMemOwn;
|
||||
|
||||
internal IAudioDeviceContext(IntPtr cPtr, bool cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(IAudioDeviceContext obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
|
||||
~IAudioDeviceContext() {
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public virtual void Dispose() {
|
||||
lock(this) {
|
||||
if (swigCPtr.Handle != IntPtr.Zero) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
cAudioCSharpWrapperPINVOKE.delete_IAudioDeviceContext(swigCPtr);
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool initialize(string deviceName, int outputFrequency, int eaxEffectSlots) {
|
||||
bool ret = cAudioCSharpWrapperPINVOKE.IAudioDeviceContext_initialize(swigCPtr, deviceName, outputFrequency, eaxEffectSlots);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual void shutDown() {
|
||||
cAudioCSharpWrapperPINVOKE.IAudioDeviceContext_shutDown(swigCPtr);
|
||||
}
|
||||
|
||||
public virtual void update() {
|
||||
cAudioCSharpWrapperPINVOKE.IAudioDeviceContext_update(swigCPtr);
|
||||
}
|
||||
|
||||
public virtual IAudioManager getAudioManager() {
|
||||
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioDeviceContext_getAudioManager(swigCPtr);
|
||||
IAudioManager ret = (cPtr == IntPtr.Zero) ? null : new IAudioManager(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual SWIGTYPE_p_cAudio__IAudioEffects getEffects() {
|
||||
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioDeviceContext_getEffects(swigCPtr);
|
||||
SWIGTYPE_p_cAudio__IAudioEffects ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_cAudio__IAudioEffects(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.4
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace cAudio {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class IPluginManager : IDisposable {
|
||||
private HandleRef swigCPtr;
|
||||
protected bool swigCMemOwn;
|
||||
|
||||
internal IPluginManager(IntPtr cPtr, bool cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(IPluginManager obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
|
||||
~IPluginManager() {
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public virtual void Dispose() {
|
||||
lock(this) {
|
||||
if (swigCPtr.Handle != IntPtr.Zero) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
cAudioCSharpWrapperPINVOKE.delete_IPluginManager(swigCPtr);
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool installPlugin(IAudioPlugin plugin, string name) {
|
||||
bool ret = cAudioCSharpWrapperPINVOKE.IPluginManager_installPlugin__SWIG_0(swigCPtr, IAudioPlugin.getCPtr(plugin), name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual bool installPlugin(IAudioPlugin plugin) {
|
||||
bool ret = cAudioCSharpWrapperPINVOKE.IPluginManager_installPlugin__SWIG_1(swigCPtr, IAudioPlugin.getCPtr(plugin));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual bool installPlugin(string filename, string name) {
|
||||
bool ret = cAudioCSharpWrapperPINVOKE.IPluginManager_installPlugin__SWIG_2(swigCPtr, filename, name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual bool installPlugin(string filename) {
|
||||
bool ret = cAudioCSharpWrapperPINVOKE.IPluginManager_installPlugin__SWIG_3(swigCPtr, filename);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual bool checkForPlugin(string name) {
|
||||
bool ret = cAudioCSharpWrapperPINVOKE.IPluginManager_checkForPlugin(swigCPtr, name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual IAudioPlugin getPlugin(string name) {
|
||||
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IPluginManager_getPlugin(swigCPtr, name);
|
||||
IAudioPlugin ret = (cPtr == IntPtr.Zero) ? null : new IAudioPlugin(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual uint getPluginCount() {
|
||||
uint ret = cAudioCSharpWrapperPINVOKE.IPluginManager_getPluginCount(swigCPtr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual void uninstallPlugin(IAudioPlugin plugin) {
|
||||
cAudioCSharpWrapperPINVOKE.IPluginManager_uninstallPlugin__SWIG_0(swigCPtr, IAudioPlugin.getCPtr(plugin));
|
||||
}
|
||||
|
||||
public virtual void uninstallPlugin(string name) {
|
||||
cAudioCSharpWrapperPINVOKE.IPluginManager_uninstallPlugin__SWIG_1(swigCPtr, name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.4
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
namespace cAudio {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SWIGTYPE_p_cAudio__IAudioEffects {
|
||||
private HandleRef swigCPtr;
|
||||
|
||||
internal SWIGTYPE_p_cAudio__IAudioEffects(IntPtr cPtr, bool futureUse) {
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_cAudio__IAudioEffects() {
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(SWIGTYPE_p_cAudio__IAudioEffects obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -39,6 +39,7 @@
|
|||
<Compile Include="IAudioCapture.cs" />
|
||||
<Compile Include="IAudioDecoder.cs" />
|
||||
<Compile Include="IAudioDecoderFactory.cs" />
|
||||
<Compile Include="IAudioDeviceContext.cs" />
|
||||
<Compile Include="IAudioDeviceList.cs" />
|
||||
<Compile Include="IAudioManager.cs" />
|
||||
<Compile Include="IAudioPlugin.cs" />
|
||||
|
@ -53,6 +54,7 @@
|
|||
<Compile Include="IManagerEventHandler.cs" />
|
||||
<Compile Include="IMemoryProvider.cs" />
|
||||
<Compile Include="IntVector.cs" />
|
||||
<Compile Include="IPluginManager.cs" />
|
||||
<Compile Include="IRefCounted.cs" />
|
||||
<Compile Include="ISourceEventHandler.cs" />
|
||||
<Compile Include="IThread.cs" />
|
||||
|
@ -61,6 +63,7 @@
|
|||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="StringMap.cs" />
|
||||
<Compile Include="StringVector.cs" />
|
||||
<Compile Include="SWIGTYPE_p_cAudio__IAudioEffects.cs" />
|
||||
<Compile Include="SWIGTYPE_p_float.cs" />
|
||||
<Compile Include="SWIGTYPE_p_p_char.cs" />
|
||||
<Compile Include="SWIGTYPE_p_std__basic_stringT_char_t.cs" />
|
||||
|
|
|
@ -12,6 +12,16 @@ using System;
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
public class cAudioCSharpWrapper {
|
||||
public static IMemoryProvider getMemoryProvider() {
|
||||
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.getMemoryProvider();
|
||||
IMemoryProvider ret = (cPtr == IntPtr.Zero) ? null : new IMemoryProvider(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void cAudioSleep(uint ms) {
|
||||
cAudioCSharpWrapperPINVOKE.cAudioSleep(ms);
|
||||
}
|
||||
|
||||
public static string toWINSTR(string str) {
|
||||
string ret = cAudioCSharpWrapperPINVOKE.toWINSTR(str);
|
||||
return ret;
|
||||
|
@ -48,6 +58,12 @@ public class cAudioCSharpWrapper {
|
|||
}
|
||||
}
|
||||
|
||||
public static IPluginManager getPluginManager() {
|
||||
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.getPluginManager();
|
||||
IPluginManager ret = (cPtr == IntPtr.Zero) ? null : new IPluginManager(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static IAudioManager createAudioManager(bool initializeDefault) {
|
||||
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.createAudioManager__SWIG_0(initializeDefault);
|
||||
IAudioManager ret = (cPtr == IntPtr.Zero) ? null : new IAudioManager(cPtr, false);
|
||||
|
@ -98,16 +114,6 @@ public class cAudioCSharpWrapper {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static IMemoryProvider getMemoryProvider() {
|
||||
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.getMemoryProvider();
|
||||
IMemoryProvider ret = (cPtr == IntPtr.Zero) ? null : new IMemoryProvider(cPtr, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static void cAudioSleep(uint ms) {
|
||||
cAudioCSharpWrapperPINVOKE.cAudioSleep(ms);
|
||||
}
|
||||
|
||||
public static SWIGTYPE_p_float new_floatp() {
|
||||
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.new_floatp();
|
||||
SWIGTYPE_p_float ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
|
||||
|
|
|
@ -189,6 +189,36 @@ class cAudioCSharpWrapperPINVOKE {
|
|||
}
|
||||
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IMemoryProvider_Allocate")]
|
||||
public static extern IntPtr IMemoryProvider_Allocate(HandleRef jarg1, uint jarg2, string jarg3, int jarg4, string jarg5);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IMemoryProvider_Free")]
|
||||
public static extern void IMemoryProvider_Free(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IMemoryProvider_getMaxAllocationSize")]
|
||||
public static extern uint IMemoryProvider_getMaxAllocationSize(HandleRef jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_delete_IMemoryProvider")]
|
||||
public static extern void delete_IMemoryProvider(HandleRef jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_CAUDIO_VERSION_get")]
|
||||
public static extern string CAUDIO_VERSION_get();
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_CAUDIO_SOURCE_BUFFER_SIZE_get")]
|
||||
public static extern int CAUDIO_SOURCE_BUFFER_SIZE_get();
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_CAUDIO_SOURCE_NUM_BUFFERS_get")]
|
||||
public static extern int CAUDIO_SOURCE_NUM_BUFFERS_get();
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_CAUDIO_SOURCE_MAX_EFFECT_SLOTS_get")]
|
||||
public static extern int CAUDIO_SOURCE_MAX_EFFECT_SLOTS_get();
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_getMemoryProvider")]
|
||||
public static extern IntPtr getMemoryProvider();
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_cAudioSleep")]
|
||||
public static extern void cAudioSleep(uint jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_toWINSTR")]
|
||||
public static extern string toWINSTR(string jarg1);
|
||||
|
||||
|
@ -801,6 +831,24 @@ class cAudioCSharpWrapperPINVOKE {
|
|||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IAudioManager_getListener")]
|
||||
public static extern IntPtr IAudioManager_getListener(HandleRef jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IAudioDeviceContext_initialize")]
|
||||
public static extern bool IAudioDeviceContext_initialize(HandleRef jarg1, string jarg2, int jarg3, int jarg4);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IAudioDeviceContext_shutDown")]
|
||||
public static extern void IAudioDeviceContext_shutDown(HandleRef jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IAudioDeviceContext_update")]
|
||||
public static extern void IAudioDeviceContext_update(HandleRef jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IAudioDeviceContext_getAudioManager")]
|
||||
public static extern IntPtr IAudioDeviceContext_getAudioManager(HandleRef jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IAudioDeviceContext_getEffects")]
|
||||
public static extern IntPtr IAudioDeviceContext_getEffects(HandleRef jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_delete_IAudioDeviceContext")]
|
||||
public static extern void delete_IAudioDeviceContext(HandleRef jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_delete_IAudioPlugin")]
|
||||
public static extern void delete_IAudioPlugin(HandleRef jarg1);
|
||||
|
||||
|
@ -1005,17 +1053,38 @@ class cAudioCSharpWrapperPINVOKE {
|
|||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IAudioSource_unRegisterAllEventHandlers")]
|
||||
public static extern void IAudioSource_unRegisterAllEventHandlers(HandleRef jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IMemoryProvider_Allocate")]
|
||||
public static extern IntPtr IMemoryProvider_Allocate(HandleRef jarg1, uint jarg2, string jarg3, int jarg4, string jarg5);
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_delete_IPluginManager")]
|
||||
public static extern void delete_IPluginManager(HandleRef jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IMemoryProvider_Free")]
|
||||
public static extern void IMemoryProvider_Free(HandleRef jarg1, HandleRef jarg2);
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IPluginManager_installPlugin__SWIG_0")]
|
||||
public static extern bool IPluginManager_installPlugin__SWIG_0(HandleRef jarg1, HandleRef jarg2, string jarg3);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IMemoryProvider_getMaxAllocationSize")]
|
||||
public static extern uint IMemoryProvider_getMaxAllocationSize(HandleRef jarg1);
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IPluginManager_installPlugin__SWIG_1")]
|
||||
public static extern bool IPluginManager_installPlugin__SWIG_1(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_delete_IMemoryProvider")]
|
||||
public static extern void delete_IMemoryProvider(HandleRef jarg1);
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IPluginManager_installPlugin__SWIG_2")]
|
||||
public static extern bool IPluginManager_installPlugin__SWIG_2(HandleRef jarg1, string jarg2, string jarg3);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IPluginManager_installPlugin__SWIG_3")]
|
||||
public static extern bool IPluginManager_installPlugin__SWIG_3(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IPluginManager_checkForPlugin")]
|
||||
public static extern bool IPluginManager_checkForPlugin(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IPluginManager_getPlugin")]
|
||||
public static extern IntPtr IPluginManager_getPlugin(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IPluginManager_getPluginCount")]
|
||||
public static extern uint IPluginManager_getPluginCount(HandleRef jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IPluginManager_uninstallPlugin__SWIG_0")]
|
||||
public static extern void IPluginManager_uninstallPlugin__SWIG_0(HandleRef jarg1, HandleRef jarg2);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IPluginManager_uninstallPlugin__SWIG_1")]
|
||||
public static extern void IPluginManager_uninstallPlugin__SWIG_1(HandleRef jarg1, string jarg2);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_getPluginManager")]
|
||||
public static extern IntPtr getPluginManager();
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IThread_start")]
|
||||
public static extern bool IThread_start(HandleRef jarg1);
|
||||
|
@ -1065,24 +1134,6 @@ class cAudioCSharpWrapperPINVOKE {
|
|||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_createAudioDeviceList__SWIG_1")]
|
||||
public static extern IntPtr createAudioDeviceList__SWIG_1();
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_CAUDIO_VERSION_get")]
|
||||
public static extern string CAUDIO_VERSION_get();
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_CAUDIO_SOURCE_BUFFER_SIZE_get")]
|
||||
public static extern int CAUDIO_SOURCE_BUFFER_SIZE_get();
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_CAUDIO_SOURCE_NUM_BUFFERS_get")]
|
||||
public static extern int CAUDIO_SOURCE_NUM_BUFFERS_get();
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_CAUDIO_SOURCE_MAX_EFFECT_SLOTS_get")]
|
||||
public static extern int CAUDIO_SOURCE_MAX_EFFECT_SLOTS_get();
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_getMemoryProvider")]
|
||||
public static extern IntPtr getMemoryProvider();
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_cAudioSleep")]
|
||||
public static extern void cAudioSleep(uint jarg1);
|
||||
|
||||
[DllImport("cAudioCSharpWrapper", EntryPoint="CSharp_IntVector_Clear")]
|
||||
public static extern void IntVector_Clear(HandleRef jarg1);
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "IAudioDecoder.h"
|
||||
#include "IAudioDecoderFactory.h"
|
||||
#include "IAudioDeviceList.h"
|
||||
#include "IAudioDeviceContext.h"
|
||||
%}
|
||||
|
||||
#if !defined(SWIGLUA) && !defined(SWIGR)
|
||||
|
@ -141,6 +142,11 @@
|
|||
%feature("director") cAudio::IAudioDecoderFactory;
|
||||
%feature("director") cAudio::IAudioDecoder;
|
||||
|
||||
%include "..\cAudio\include\IMemoryProvider.h"
|
||||
%include "..\cAudio\include\cAudioDefines.h"
|
||||
%include "..\cAudio\include\cAudioMemory.h"
|
||||
%include "..\cAudio\include\cAudioPlatform.h"
|
||||
%include "..\cAudio\include\cAudioSleep.h"
|
||||
%include "..\cAudio\include\cAudioString.h"
|
||||
%include "..\cAudio\include\IAudioDeviceList.h"
|
||||
%include "..\cAudio\include\EAudioFormats.h"
|
||||
|
@ -154,25 +160,20 @@
|
|||
%include "..\cAudio\include\IManagerEventHandler.h"
|
||||
%include "..\cAudio\include\ISourceEventHandler.h"
|
||||
%include "..\cAudio\include\ICaptureEventHandler.h"
|
||||
%include "..\cAudio\include\IEffectParameters.h"
|
||||
%include "..\cAudio\include\IFilter.h"
|
||||
%include "..\cAudio\include\IEffect.h"
|
||||
%include "..\cAudio\include\IAudioEffects.h"
|
||||
%include "..\cAudio\include\IAudioCapture.h"
|
||||
%include "..\cAudio\include\IAudioDecoder.h"
|
||||
%include "..\cAudio\include\IAudioDecoderFactory.h"
|
||||
%include "..\cAudio\include\IAudioEffects.h"
|
||||
%include "..\cAudio\include\IAudioManager.h"
|
||||
%include "..\cAudio\include\IAudioDeviceContext.h"
|
||||
%include "..\cAudio\include\IAudioPlugin.h"
|
||||
%include "..\cAudio\include\IAudioSource.h"
|
||||
%include "..\cAudio\include\IEffect.h"
|
||||
%include "..\cAudio\include\IEffectParameters.h"
|
||||
%include "..\cAudio\include\IFilter.h"
|
||||
%include "..\cAudio\include\IMemoryProvider.h"
|
||||
%include "..\cAudio\include\IPluginManager.h"
|
||||
%include "..\cAudio\include\IThread.h"
|
||||
%include "..\cAudio\include\cAudio.h"
|
||||
%include "..\cAudio\include\cAudioDefines.h"
|
||||
%include "..\cAudio\include\cAudioMemory.h"
|
||||
%include "..\cAudio\include\cAudioPlatform.h"
|
||||
%include "..\cAudio\include\cAudioSleep.h"
|
||||
|
||||
|
||||
namespace std {
|
||||
%template(IntVector) vector<int>;
|
||||
|
|
|
@ -376,6 +376,7 @@ namespace Swig {
|
|||
#include "IAudioDecoder.h"
|
||||
#include "IAudioDecoderFactory.h"
|
||||
#include "IAudioDeviceList.h"
|
||||
#include "IAudioDeviceContext.h"
|
||||
|
||||
SWIGINTERN std::vector< int > *new_std_vector_Sl_int_Sg___SWIG_2(int capacity){
|
||||
std::vector< int >* pv = 0;
|
||||
|
@ -1436,6 +1437,114 @@ void SwigDirector_IAudioDecoderFactory::swig_init_callbacks() {
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_IMemoryProvider_Allocate(void * jarg1, unsigned long jarg2, char * jarg3, int jarg4, char * jarg5) {
|
||||
void * jresult ;
|
||||
cAudio::IMemoryProvider *arg1 = (cAudio::IMemoryProvider *) 0 ;
|
||||
size_t arg2 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
int arg4 ;
|
||||
char *arg5 = (char *) 0 ;
|
||||
void *result = 0 ;
|
||||
|
||||
arg1 = (cAudio::IMemoryProvider *)jarg1;
|
||||
arg2 = (size_t)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
arg4 = (int)jarg4;
|
||||
arg5 = (char *)jarg5;
|
||||
result = (void *)(arg1)->Allocate(arg2,(char const *)arg3,arg4,(char const *)arg5);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_IMemoryProvider_Free(void * jarg1, void * jarg2) {
|
||||
cAudio::IMemoryProvider *arg1 = (cAudio::IMemoryProvider *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
|
||||
arg1 = (cAudio::IMemoryProvider *)jarg1;
|
||||
arg2 = (void *)jarg2;
|
||||
(arg1)->Free(arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_IMemoryProvider_getMaxAllocationSize(void * jarg1) {
|
||||
unsigned long jresult ;
|
||||
cAudio::IMemoryProvider *arg1 = (cAudio::IMemoryProvider *) 0 ;
|
||||
size_t result;
|
||||
|
||||
arg1 = (cAudio::IMemoryProvider *)jarg1;
|
||||
result = (arg1)->getMaxAllocationSize();
|
||||
jresult = (unsigned long)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_delete_IMemoryProvider(void * jarg1) {
|
||||
cAudio::IMemoryProvider *arg1 = (cAudio::IMemoryProvider *) 0 ;
|
||||
|
||||
arg1 = (cAudio::IMemoryProvider *)jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_CAUDIO_VERSION_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *)("2.2.0");
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_CAUDIO_SOURCE_BUFFER_SIZE_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
result = (int)((1024*64));
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_CAUDIO_SOURCE_NUM_BUFFERS_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
result = (int)(3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_CAUDIO_SOURCE_MAX_EFFECT_SLOTS_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
result = (int)(4);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_getMemoryProvider() {
|
||||
void * jresult ;
|
||||
cAudio::IMemoryProvider *result = 0 ;
|
||||
|
||||
result = (cAudio::IMemoryProvider *)cAudio::getMemoryProvider();
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_cAudioSleep(unsigned int jarg1) {
|
||||
unsigned int arg1 ;
|
||||
|
||||
arg1 = (unsigned int)jarg1;
|
||||
cAudio::cAudioSleep(arg1);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_toWINSTR(char * jarg1) {
|
||||
char * jresult ;
|
||||
char *arg1 = (char *) 0 ;
|
||||
|
@ -3923,6 +4032,72 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_IAudioManager_getListener(void * jarg1) {
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_IAudioDeviceContext_initialize(void * jarg1, char * jarg2, int jarg3, int jarg4) {
|
||||
unsigned int jresult ;
|
||||
cAudio::IAudioDeviceContext *arg1 = (cAudio::IAudioDeviceContext *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
int arg3 ;
|
||||
int arg4 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (cAudio::IAudioDeviceContext *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (int)jarg3;
|
||||
arg4 = (int)jarg4;
|
||||
result = (bool)(arg1)->initialize((char const *)arg2,arg3,arg4);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_IAudioDeviceContext_shutDown(void * jarg1) {
|
||||
cAudio::IAudioDeviceContext *arg1 = (cAudio::IAudioDeviceContext *) 0 ;
|
||||
|
||||
arg1 = (cAudio::IAudioDeviceContext *)jarg1;
|
||||
(arg1)->shutDown();
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_IAudioDeviceContext_update(void * jarg1) {
|
||||
cAudio::IAudioDeviceContext *arg1 = (cAudio::IAudioDeviceContext *) 0 ;
|
||||
|
||||
arg1 = (cAudio::IAudioDeviceContext *)jarg1;
|
||||
(arg1)->update();
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_IAudioDeviceContext_getAudioManager(void * jarg1) {
|
||||
void * jresult ;
|
||||
cAudio::IAudioDeviceContext *arg1 = (cAudio::IAudioDeviceContext *) 0 ;
|
||||
cAudio::IAudioManager *result = 0 ;
|
||||
|
||||
arg1 = (cAudio::IAudioDeviceContext *)jarg1;
|
||||
result = (cAudio::IAudioManager *)((cAudio::IAudioDeviceContext const *)arg1)->getAudioManager();
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_IAudioDeviceContext_getEffects(void * jarg1) {
|
||||
void * jresult ;
|
||||
cAudio::IAudioDeviceContext *arg1 = (cAudio::IAudioDeviceContext *) 0 ;
|
||||
cAudio::IAudioEffects *result = 0 ;
|
||||
|
||||
arg1 = (cAudio::IAudioDeviceContext *)jarg1;
|
||||
result = (cAudio::IAudioEffects *)((cAudio::IAudioDeviceContext const *)arg1)->getEffects();
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_delete_IAudioDeviceContext(void * jarg1) {
|
||||
cAudio::IAudioDeviceContext *arg1 = (cAudio::IAudioDeviceContext *) 0 ;
|
||||
|
||||
arg1 = (cAudio::IAudioDeviceContext *)jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_delete_IAudioPlugin(void * jarg1) {
|
||||
cAudio::IAudioPlugin *arg1 = (cAudio::IAudioPlugin *) 0 ;
|
||||
|
||||
|
@ -4759,53 +4934,141 @@ SWIGEXPORT void SWIGSTDCALL CSharp_IAudioSource_unRegisterAllEventHandlers(void
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_IMemoryProvider_Allocate(void * jarg1, unsigned long jarg2, char * jarg3, int jarg4, char * jarg5) {
|
||||
void * jresult ;
|
||||
cAudio::IMemoryProvider *arg1 = (cAudio::IMemoryProvider *) 0 ;
|
||||
size_t arg2 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
int arg4 ;
|
||||
char *arg5 = (char *) 0 ;
|
||||
void *result = 0 ;
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_delete_IPluginManager(void * jarg1) {
|
||||
cAudio::IPluginManager *arg1 = (cAudio::IPluginManager *) 0 ;
|
||||
|
||||
arg1 = (cAudio::IMemoryProvider *)jarg1;
|
||||
arg2 = (size_t)jarg2;
|
||||
arg1 = (cAudio::IPluginManager *)jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_IPluginManager_installPlugin__SWIG_0(void * jarg1, void * jarg2, char * jarg3) {
|
||||
unsigned int jresult ;
|
||||
cAudio::IPluginManager *arg1 = (cAudio::IPluginManager *) 0 ;
|
||||
cAudio::IAudioPlugin *arg2 = (cAudio::IAudioPlugin *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (cAudio::IPluginManager *)jarg1;
|
||||
arg2 = (cAudio::IAudioPlugin *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
arg4 = (int)jarg4;
|
||||
arg5 = (char *)jarg5;
|
||||
result = (void *)(arg1)->Allocate(arg2,(char const *)arg3,arg4,(char const *)arg5);
|
||||
result = (bool)(arg1)->installPlugin(arg2,(char const *)arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_IPluginManager_installPlugin__SWIG_1(void * jarg1, void * jarg2) {
|
||||
unsigned int jresult ;
|
||||
cAudio::IPluginManager *arg1 = (cAudio::IPluginManager *) 0 ;
|
||||
cAudio::IAudioPlugin *arg2 = (cAudio::IAudioPlugin *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (cAudio::IPluginManager *)jarg1;
|
||||
arg2 = (cAudio::IAudioPlugin *)jarg2;
|
||||
result = (bool)(arg1)->installPlugin(arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_IPluginManager_installPlugin__SWIG_2(void * jarg1, char * jarg2, char * jarg3) {
|
||||
unsigned int jresult ;
|
||||
cAudio::IPluginManager *arg1 = (cAudio::IPluginManager *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
char *arg3 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (cAudio::IPluginManager *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
arg3 = (char *)jarg3;
|
||||
result = (bool)(arg1)->installPlugin((char const *)arg2,(char const *)arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_IPluginManager_installPlugin__SWIG_3(void * jarg1, char * jarg2) {
|
||||
unsigned int jresult ;
|
||||
cAudio::IPluginManager *arg1 = (cAudio::IPluginManager *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (cAudio::IPluginManager *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (bool)(arg1)->installPlugin((char const *)arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_IPluginManager_checkForPlugin(void * jarg1, char * jarg2) {
|
||||
unsigned int jresult ;
|
||||
cAudio::IPluginManager *arg1 = (cAudio::IPluginManager *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
bool result;
|
||||
|
||||
arg1 = (cAudio::IPluginManager *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (bool)(arg1)->checkForPlugin((char const *)arg2);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_IPluginManager_getPlugin(void * jarg1, char * jarg2) {
|
||||
void * jresult ;
|
||||
cAudio::IPluginManager *arg1 = (cAudio::IPluginManager *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
cAudio::IAudioPlugin *result = 0 ;
|
||||
|
||||
arg1 = (cAudio::IPluginManager *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
result = (cAudio::IAudioPlugin *)(arg1)->getPlugin((char const *)arg2);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_IMemoryProvider_Free(void * jarg1, void * jarg2) {
|
||||
cAudio::IMemoryProvider *arg1 = (cAudio::IMemoryProvider *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_IPluginManager_getPluginCount(void * jarg1) {
|
||||
unsigned int jresult ;
|
||||
cAudio::IPluginManager *arg1 = (cAudio::IPluginManager *) 0 ;
|
||||
unsigned int result;
|
||||
|
||||
arg1 = (cAudio::IMemoryProvider *)jarg1;
|
||||
arg2 = (void *)jarg2;
|
||||
(arg1)->Free(arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_IMemoryProvider_getMaxAllocationSize(void * jarg1) {
|
||||
unsigned long jresult ;
|
||||
cAudio::IMemoryProvider *arg1 = (cAudio::IMemoryProvider *) 0 ;
|
||||
size_t result;
|
||||
|
||||
arg1 = (cAudio::IMemoryProvider *)jarg1;
|
||||
result = (arg1)->getMaxAllocationSize();
|
||||
jresult = (unsigned long)result;
|
||||
arg1 = (cAudio::IPluginManager *)jarg1;
|
||||
result = (unsigned int)(arg1)->getPluginCount();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_delete_IMemoryProvider(void * jarg1) {
|
||||
cAudio::IMemoryProvider *arg1 = (cAudio::IMemoryProvider *) 0 ;
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_IPluginManager_uninstallPlugin__SWIG_0(void * jarg1, void * jarg2) {
|
||||
cAudio::IPluginManager *arg1 = (cAudio::IPluginManager *) 0 ;
|
||||
cAudio::IAudioPlugin *arg2 = (cAudio::IAudioPlugin *) 0 ;
|
||||
|
||||
arg1 = (cAudio::IMemoryProvider *)jarg1;
|
||||
delete arg1;
|
||||
arg1 = (cAudio::IPluginManager *)jarg1;
|
||||
arg2 = (cAudio::IAudioPlugin *)jarg2;
|
||||
(arg1)->uninstallPlugin(arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_IPluginManager_uninstallPlugin__SWIG_1(void * jarg1, char * jarg2) {
|
||||
cAudio::IPluginManager *arg1 = (cAudio::IPluginManager *) 0 ;
|
||||
char *arg2 = (char *) 0 ;
|
||||
|
||||
arg1 = (cAudio::IPluginManager *)jarg1;
|
||||
arg2 = (char *)jarg2;
|
||||
(arg1)->uninstallPlugin((char const *)arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_getPluginManager() {
|
||||
void * jresult ;
|
||||
cAudio::IPluginManager *result = 0 ;
|
||||
|
||||
result = (cAudio::IPluginManager *)cAudio::getPluginManager();
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4965,64 +5228,6 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_createAudioDeviceList__SWIG_1() {
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT char * SWIGSTDCALL CSharp_CAUDIO_VERSION_get() {
|
||||
char * jresult ;
|
||||
char *result = 0 ;
|
||||
|
||||
result = (char *)("2.2.0");
|
||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_CAUDIO_SOURCE_BUFFER_SIZE_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
result = (int)((1024*64));
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_CAUDIO_SOURCE_NUM_BUFFERS_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
result = (int)(3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_CAUDIO_SOURCE_MAX_EFFECT_SLOTS_get() {
|
||||
int jresult ;
|
||||
int result;
|
||||
|
||||
result = (int)(4);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_getMemoryProvider() {
|
||||
void * jresult ;
|
||||
cAudio::IMemoryProvider *result = 0 ;
|
||||
|
||||
result = (cAudio::IMemoryProvider *)cAudio::getMemoryProvider();
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_cAudioSleep(unsigned int jarg1) {
|
||||
unsigned int arg1 ;
|
||||
|
||||
arg1 = (unsigned int)jarg1;
|
||||
cAudio::cAudioSleep(arg1);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_IntVector_Clear(void * jarg1) {
|
||||
std::vector< int > *arg1 = (std::vector< int > *) 0 ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue