#include "EngineImpl.h" void* Soundwich::Engine::operator new(size_t size) { return Util::Alloc( size ); } void Soundwich::Engine::operator delete(void* memory) { Util::Free( memory ); } Soundwich::Engine::Engine( ) { _impl = new Impl( ); } Soundwich::Engine::~Engine( ) { delete _impl; } SoundResult Soundwich::Engine::Create( Engine** engine, IClientSystem* clientSystem ) { if ( clientSystem != nullptr ) Soundwich::Engine::Impl::SetClientSystem( clientSystem ); *engine = new Engine( ); return (*engine)->_impl->Run( ); } SoundResult Soundwich::Engine::Destroy( Engine* engine ) { delete engine; return Ok; } SoundResult Soundwich::Engine::SetDataPath( const char* dataPath ) { AssertMessage( dataPath, "Data path is null" ); return _impl->SetDataPath( Util::String( dataPath ) ); } SoundResult Soundwich::Engine::CreateSynthFromXmlFile( const char* name, Soundwich::Synth** synth, const char* fileName ) { AssertMessage( name, "Name is null" ); return _impl->CreateSynthFromXmlFile( name, synth, fileName ); } SoundResult Soundwich::Engine::CreateSynthFromMemory( const char* name, Soundwich::Synth** synth, void* data, uint32 size ) { AssertMessage( name, "Name is null" ); return _impl->CreateSynthFromMemory( name, synth, data, size ); } SoundResult Soundwich::Engine::CreateSynthFromXmlMemory( const char* name, Soundwich::Synth** synth, const char* xml ) { AssertMessage( name, "Name is null" ); return _impl->CreateSynthFromXmlMemory( name, synth, xml ); } SoundResult Soundwich::Engine::SaveSynthToFile( Soundwich::Synth* synth, const char* fileName ) { AssertMessage( synth, "Synth is null" ); return _impl->SaveSynthToFile( synth, fileName ); } SoundResult Soundwich::Engine::SaveSynthToXmlFile( Soundwich::Synth* synth, const char* fileName ) { AssertMessage( synth, "Synth is null" ); return _impl->SaveSynthToXmlFile( synth, fileName ); } SoundResult Soundwich::Engine::DestroySynth( Synth* synth ) { AssertMessage( synth, "Synth is null" ); return _impl->DestroySynth( synth ); } SoundResult Soundwich::Engine::ActivateSynth( Synth* synth ) { AssertMessage( synth, "Synth is null" ); return _impl->ActivateSynth( synth ); } SoundResult Soundwich::Engine::DeactivateSynth( Synth* synth ) { AssertMessage( synth, "Synth is null" ); return _impl->DeactivateSynth( synth ); } SoundResult Soundwich::Engine::Tick( ) { return _impl->Tick( ); } SoundResult Soundwich::Engine::GetSynth( const char* name, Synth** synth ) { AssertMessage( name, "Synth name is null" ); return _impl->GetSynth( Util::String( name ), synth ); } SoundResult Soundwich::Engine::GetEventInComponent( Synth* synth, const char* componentName, EventIn** eventIn ) { AssertMessage( synth, "Synth is null" ); AssertMessage( componentName, "Component name is null" ); return _impl->GetEventInComponent( synth, Util::String( componentName ), eventIn ); } SoundResult Soundwich::Engine::GetEventInWithIdComponent( Synth* synth, const char* componentName, EventInWithId** eventIn ) { AssertMessage( synth, "Synth is null" ); AssertMessage( componentName, "Component name is null" ); return _impl->GetEventInWithIdComponent( synth, Util::String( componentName ), eventIn ); } SoundResult Soundwich::Engine::GetControlInComponent( Synth* synth, const char* componentName, ControlIn** controlIn ) { AssertMessage( synth, "Synth is null" ); AssertMessage( componentName, "Component name is null" ); return _impl->GetControlInComponent( synth, Util::String( componentName ), controlIn ); } SoundResult Soundwich::Engine::GetSwitchInComponent( Synth* synth, const char* componentName, SwitchIn** switchIn ) { AssertMessage( synth, "Synth is null" ); AssertMessage( componentName, "Component name is null" ); return _impl->GetSwitchInComponent( synth, Util::String( componentName ), switchIn ); } SoundResult Soundwich::Engine::GetEventOutComponent( Synth* synth, const char* componentName, EventOut** eventOut ) { AssertMessage( synth, "Synth is null" ); AssertMessage( componentName, "Component name is null" ); return _impl->GetEventOutComponent( synth, Util::String( componentName ), eventOut ); } SoundResult Soundwich::Engine::GetControlOutComponent( Synth* synth, const char* componentName, ControlOut** controlOut ) { AssertMessage( synth, "Synth is null" ); AssertMessage( componentName, "Component name is null" ); return _impl->GetControlOutComponent( synth, Util::String( componentName ), controlOut ); } SoundResult Soundwich::Engine::GetSwitchOutComponent( Synth* synth, const char* componentName, SwitchOut** switchOut ) { AssertMessage( synth, "Synth is null" ); AssertMessage( componentName, "Component name is null" ); return _impl->GetSwitchOutComponent( synth, Util::String( componentName ), switchOut ); } SoundResult Soundwich::Engine::SetEventIn( EventIn* eventIn ) { Assert( eventIn ); return _impl->SetEventIn( eventIn ); } SoundResult Soundwich::Engine::SetEventInWithId( EventInWithId* eventIn, int32 val ) { Assert( eventIn ); return _impl->SetEventInWithId( eventIn, val ); } SoundResult Soundwich::Engine::SetControlIn( ControlIn* controlIn, flt32 val ) { Assert( controlIn ); return _impl->SetControlIn( controlIn, val ); } SoundResult Soundwich::Engine::SetSwitchIn( SwitchIn* switchIn, int32 val ) { Assert( switchIn ); return _impl->SetSwitchIn( switchIn, val ); } SoundResult Soundwich::Engine::GetComponent( Soundwich::Synth* synth, const char* componentName, Soundwich::Component** component ) { Assert( synth ); Assert( componentName ); return _impl->GetComponent( synth, componentName, component ); } SoundResult Soundwich::Engine::SwitchTracking(Soundwich::Synth* synth, bool enable, const char* exportFilePath) { Assert(synth); return _impl->SwitchTracking(synth, enable, exportFilePath); } SoundResult Soundwich::Engine::SetSynthDebugLogging( Soundwich::Synth* synth, bool enable ) { Assert( synth ); return _impl->SetSynthDebugLogging( synth, enable ); } SoundResult Soundwich::Engine::SetComponentDebugLogging( Soundwich::Component* component, bool enable ) { Assert( component ); return _impl->SetComponentDebugLogging( component, enable ); } SoundResult Soundwich::Engine::SetConnectionDebugLogging( Soundwich::Connection* connection, bool enable ) { Assert( connection ); return _impl->SetConnectionDebugLogging( connection, enable ); } SoundResult Soundwich::Engine::RegisterEventOutCallback( IEventOutCallback* cb, EventOut* eventOut ) { Assert( cb ); Assert( eventOut ); return _impl->RegisterEventOutCallback( cb, eventOut ); } SoundResult Soundwich::Engine::RegisterControlOutCallback( IControlOutCallback* cb, ControlOut* controlOut ) { Assert( cb ); Assert( controlOut ); return _impl->RegisterControlOutCallback( cb, controlOut ); } SoundResult Soundwich::Engine::RegisterSwitchOutCallback( ISwitchOutCallback* cb, SwitchOut* switchOut ) { Assert( cb ); Assert( switchOut ); return _impl->RegisterSwitchOutCallback( cb, switchOut ); } SoundResult Soundwich::Engine::RegisterJustDancePlayMenuMusicCallback( IJustDancePlayMenuMusicCallback* cb ) { Assert( cb ); return _impl->RegisterJustDancePlayMenuMusicCallback( cb ); } SoundResult Soundwich::Engine::RegisterJustDanceStopMenuMusicCallback( IJustDanceStopMenuMusicCallback* cb ) { Assert( cb ); return _impl->RegisterJustDanceStopMenuMusicCallback( cb ); } SoundResult Soundwich::Engine::RegisterJustDanceSoundEffectCallback( IJustDanceSoundEffectCallback* cb ) { Assert( cb ); return _impl->RegisterJustDanceSoundEffectCallback( cb ); } SoundResult Soundwich::Engine::RegisterJustDanceSoundEffectOnTrackTransitionCallback( IJustDanceSoundEffectOnTrackTransitionCallback* cb ) { Assert( cb ); return _impl->RegisterJustDanceSoundEffectOnTrackTransitionCallback( cb ); } SoundResult Soundwich::Engine::RegisterJustDanceRemoteSoundEffectCallback( IJustDanceRemoteSoundEffectCallback* cb ) { Assert( cb ); return _impl->RegisterJustDanceRemoteSoundEffectCallback( cb ); } SoundResult Soundwich::Engine::RegisterJustDancePlayEventBusMusicCallback( IJustDancePlayEventBusMusicCallback* cb ) { Assert( cb ); return _impl->RegisterJustDancePlayEventBusMusicCallback( cb ); } SoundResult Soundwich::Engine::RegisterJustDanceStopEventBusMusicCallback( IJustDanceStopEventBusMusicCallback* cb ) { Assert( cb ); return _impl->RegisterJustDanceStopEventBusMusicCallback( cb ); } SoundResult Soundwich::Engine::RegisterJustDanceStopAllEventBusMixesCallback(IJustDanceStopAllEventBusMixesCallback* cb) { Assert(cb); return _impl->RegisterJustDanceStopAllEventBusMixesCallback(cb); } SoundResult Soundwich::Engine::RegisterJustDancePlayMusicMultiTrackCallback ( IJustDancePlayMusicMultiTrackCallback* cb ) { Assert( cb ); return _impl->RegisterJustDancePlayMusicMultiTrackCallback( cb ); } SoundResult Soundwich::Engine::RegisterSoundwichTrackingCallback(ISoundwichTracking* cb) { Assert(cb); return _impl->RegisterSoundwichTrackingCallback(cb); } SoundResult Soundwich::Engine::UnregisterEventOutCallback( IEventOutCallback* cb, EventOut* eventOut ) { Assert( cb ); return _impl->UnregisterEventOutCallback( cb, eventOut ); } SoundResult Soundwich::Engine::UnregisterControlOutCallback( IControlOutCallback* cb, ControlOut* controlOut ) { Assert( cb ); return _impl->UnregisterControlOutCallback( cb, controlOut ); } SoundResult Soundwich::Engine::UnregisterSwitchOutCallback( ISwitchOutCallback* cb, SwitchOut* switchOut ) { Assert( cb ); return _impl->UnregisterSwitchOutCallback( cb, switchOut ); } SoundResult Soundwich::Engine::UnregisterJustDancePlayMenuMusicCallback( IJustDancePlayMenuMusicCallback* cb ) { Assert( cb ); return _impl->UnregisterJustDancePlayMenuMusicCallback( cb ); } SoundResult Soundwich::Engine::UnregisterJustDanceStopMenuMusicCallback( IJustDanceStopMenuMusicCallback* cb ) { Assert( cb ); return _impl->UnregisterJustDanceStopMenuMusicCallback( cb ); } SoundResult Soundwich::Engine::UnregisterJustDanceSoundEffectCallback( IJustDanceSoundEffectCallback* cb ) { Assert( cb ); return _impl->UnregisterJustDanceSoundEffectCallback( cb ); } SoundResult Soundwich::Engine::UnregisterJustDanceSoundEffectOnTrackTransitionCallback( IJustDanceSoundEffectOnTrackTransitionCallback* cb ) { Assert( cb ); return _impl->UnregisterJustDanceSoundEffectOnTrackTransitionCallback( cb ); } SoundResult Soundwich::Engine::UnregisterJustDanceRemoteSoundEffectCallback( IJustDanceRemoteSoundEffectCallback* cb ) { Assert( cb ); return _impl->UnregisterJustDanceRemoteSoundEffectCallback( cb ); } SoundResult Soundwich::Engine::UnregisterJustDancePlayEventBusMusicCallback( IJustDancePlayEventBusMusicCallback* cb ) { Assert( cb ); return _impl->UnregisterJustDancePlayEventBusMusicCallback( cb ); } SoundResult Soundwich::Engine::UnregisterJustDanceStopEventBusMusicCallback( IJustDanceStopEventBusMusicCallback* cb ) { Assert( cb ); return _impl->UnregisterJustDanceStopEventBusMusicCallback( cb ); } SoundResult Soundwich::Engine::UnregisterJustDanceStopAllEventBusMixesCallback(IJustDanceStopAllEventBusMixesCallback* cb) { Assert(cb); return _impl->UnregisterJustDanceStopAllEventBusMixesCallback(cb); } SoundResult Soundwich::Engine::UnregisterJustDancePlayMusicMultiTrackCallback ( IJustDancePlayMusicMultiTrackCallback* cb ) { Assert( cb ); return _impl->UnregisterJustDancePlayMusicMultiTrackCallback( cb ); } SoundResult Soundwich::Engine::UnregisterSoundwichTrackingCallback(ISoundwichTracking* cb) { Assert(cb); return _impl->UnregisterSoundwichTrackingCallback(cb); }