86 lines
5.6 KiB
C
86 lines
5.6 KiB
C
#pragma once
|
|
|
|
|
|
#include "Inc/Engine.h"
|
|
#include "Util/String.h"
|
|
|
|
|
|
extern "C"
|
|
{
|
|
typedef void (__stdcall *OnSoundwichEventOut)( const Soundwich::EventOut* eventOut );
|
|
typedef void (__stdcall *OnSoundwichControlOut)( const Soundwich::ControlOut* controlOut, flt32 val );
|
|
typedef void (__stdcall *OnSoundwichSwitchOut)( const Soundwich::SwitchOut* controlOut, int val );
|
|
|
|
// Middleware
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichInitWwise( const char* dataPath, const char* initBank );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichTickWwise( );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichShutdownWwise( );
|
|
|
|
// Engine setup
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichCreate( Soundwich::Engine** engine );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichDestroy( Soundwich::Engine* engine );
|
|
|
|
// Data Path
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichSetDataPath( Soundwich::Engine* engine, const char* path );
|
|
|
|
// Synths
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichCreateSynthFromXmlFile( Soundwich::Engine* engine, const char* name, Soundwich::Synth** synth, const char* fileName );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichCreateSynthFromMemory( Soundwich::Engine* engine, const char* name, Soundwich::Synth** synth, void* data, uint32 size );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichCreateSynthFromXmlMemory( Soundwich::Engine* engine, const char* name, Soundwich::Synth** synth, const char* xml );
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichSaveSynthToFile( Soundwich::Engine* engine, Soundwich::Synth* synth, const char* fileName );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichSaveSynthToXmlFile( Soundwich::Engine* engine, Soundwich::Synth* synth, const char* fileName );
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichDestroySynth( Soundwich::Engine* engine, Soundwich::Synth* synth );
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichActivateSynth( Soundwich::Engine* engine, Soundwich::Synth* synth );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichDeactivateSynth( Soundwich::Engine* engine, Soundwich::Synth* synth );
|
|
|
|
// Accessors
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichGetSynth( Soundwich::Engine* engine, const char* name, Soundwich::Synth** synth );
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichGetEventInComponent( Soundwich::Engine* engine, Soundwich::Synth* synth, const char* componentName, Soundwich::EventIn** eventIn );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichGetEventInWithIdComponent( Soundwich::Engine* engine, Soundwich::Synth* synth, const char* componentName, Soundwich::EventInWithId** eventIn );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichGetControlInComponent( Soundwich::Engine* engine, Soundwich::Synth* synth, const char* componentName, Soundwich::ControlIn** controlIn );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichGetSwitchInComponent( Soundwich::Engine* engine, Soundwich::Synth* synth, const char* componentName, Soundwich::SwitchIn** switchIn );
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichGetEventOutComponent( Soundwich::Engine* engine, Soundwich::Synth* synth, const char* componentName, Soundwich::EventOut** eventOut );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichGetControlOutComponent( Soundwich::Engine* engine, Soundwich::Synth* synth, const char* componentName, Soundwich::ControlOut** controlOut );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichGetSwitchOutComponent( Soundwich::Engine* engine, Soundwich::Synth* synth, const char* componentName, Soundwich::SwitchOut** switchOut );
|
|
|
|
// Tick
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichTick( Soundwich::Engine* engine );
|
|
|
|
// Interface Controls
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichSetEventIn( Soundwich::Engine* engine, Soundwich::EventIn* eventIn );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichSetEventInWithId( Soundwich::Engine* engine, Soundwich::EventInWithId* eventIn );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichSetControlIn( Soundwich::Engine* engine, Soundwich::ControlIn* controlIn, flt32 val );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichSetSwitchIn( Soundwich::Engine* engine, Soundwich::SwitchIn* switchIn, int32 val );
|
|
|
|
// Debugging
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichGetComponent( Soundwich::Engine* engine, Soundwich::Synth* synth, const char* componentName, Soundwich::Component** component );
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichSetSynthDebugLogging( Soundwich::Engine* engine, Soundwich::Synth* synth, bool enable );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichSetComponentDebugLogging( Soundwich::Engine* engine, Soundwich::Component* component, bool enable );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichSetConnectionDebugLogging( Soundwich::Engine* engine, Soundwich::Connection* connection, bool enable );
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichSwitchTracking(Soundwich::Engine* engine, Soundwich::Synth* synth, bool enable, const char* exportFilePath);
|
|
|
|
// Callbacks
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichRegisterEventOutCallback( Soundwich::Engine* engine, OnSoundwichEventOut cb, Soundwich::EventOut* eventOut );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichRegisterControlOutCallback( Soundwich::Engine* engine, OnSoundwichControlOut cb, Soundwich::ControlOut* controlOut );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichRegisterSwitchOutCallback( Soundwich::Engine* engine, OnSoundwichSwitchOut cb, Soundwich::SwitchOut* switchOut );
|
|
|
|
SOUNDWICH_EXPORT SoundResult SoundwichUnregisterEventOutCallback( Soundwich::Engine* engine, OnSoundwichEventOut cb, Soundwich::EventOut* eventOut );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichUnregisterControlOutCallback( Soundwich::Engine* engine, OnSoundwichControlOut cb, Soundwich::ControlOut* controlOut );
|
|
SOUNDWICH_EXPORT SoundResult SoundwichUnregisterSwitchOutCallback( Soundwich::Engine* engine, OnSoundwichSwitchOut cb, Soundwich::SwitchOut* switchOut );
|
|
}
|