242 lines
5.2 KiB
C++
242 lines
5.2 KiB
C++
#pragma once
|
|
|
|
#include "EngineImpl.h"
|
|
|
|
|
|
#if defined( USE_DEFERRED_COMMANDS )
|
|
|
|
namespace Soundwich
|
|
{
|
|
class InternalShutdownCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
InternalShutdownCommand( Engine::Impl* engine )
|
|
{
|
|
_engine = engine;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_engine->InternalShutdown( );
|
|
}
|
|
|
|
private:
|
|
Engine::Impl* _engine;
|
|
};
|
|
|
|
class InternalDestroySynthCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
InternalDestroySynthCommand( Synth* synth )
|
|
{
|
|
_synth = synth;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_synth->GetEngine( )->InternalDestroySynth( _synth );
|
|
}
|
|
|
|
private:
|
|
Synth* _synth;
|
|
};
|
|
|
|
class InternalActivateSynthCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
InternalActivateSynthCommand( Synth* synth )
|
|
{
|
|
_synth = synth;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_synth->GetEngine( )->InternalActivateSynth( _synth );
|
|
}
|
|
|
|
private:
|
|
Synth* _synth;
|
|
};
|
|
|
|
class InternalDeactivateSynthCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
InternalDeactivateSynthCommand( Synth* synth )
|
|
{
|
|
_synth = synth;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_synth->GetEngine( )->InternalDeactivateSynth( _synth );
|
|
}
|
|
|
|
private:
|
|
Synth* _synth;
|
|
};
|
|
|
|
class InternalSetEventInCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
InternalSetEventInCommand( EventIn* eventIn )
|
|
{
|
|
_eventIn = eventIn;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_eventIn->GetEngine( )->InternalSetEventIn( _eventIn );
|
|
}
|
|
|
|
private:
|
|
EventIn* _eventIn;
|
|
};
|
|
|
|
class InternalSetEventInWithIdCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
InternalSetEventInWithIdCommand( EventInWithId* eventIn )
|
|
{
|
|
_eventIn = eventIn;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_eventIn->GetEngine( )->InternalSetEventIn( _eventIn );
|
|
}
|
|
|
|
private:
|
|
EventInWithId* _eventIn;
|
|
};
|
|
|
|
class InternalSetControlInCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
InternalSetControlInCommand( ControlIn* controlIn, flt32 val )
|
|
{
|
|
_controlIn = controlIn;
|
|
_val = val;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_controlIn->GetEngine( )->InternalSetControlIn( _controlIn, _val );
|
|
}
|
|
|
|
private:
|
|
ControlIn* _controlIn;
|
|
flt32 _val;
|
|
};
|
|
|
|
class InternalSetSwitchInCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
InternalSetSwitchInCommand( SwitchIn* switchIn, int32 val )
|
|
{
|
|
_switchIn = switchIn;
|
|
_val = val;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_switchIn->GetEngine( )->InternalSetSwitchIn( _switchIn, _val );
|
|
}
|
|
|
|
private:
|
|
SwitchIn* _switchIn;
|
|
int32 _val;
|
|
};
|
|
|
|
class ExternalDestroySynthCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
ExternalDestroySynthCommand( Synth* synth )
|
|
{
|
|
_synth = synth;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_synth->GetEngine( )->ExternalDestroySynth( _synth );
|
|
}
|
|
|
|
private:
|
|
Synth* _synth;
|
|
};
|
|
|
|
class ExternalSetEventOutCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
ExternalSetEventOutCommand( EventOut* eventOut )
|
|
{
|
|
_eventOut = eventOut;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_eventOut->GetEngine( )->ExternalSetEventOut( _eventOut );
|
|
}
|
|
|
|
private:
|
|
EventOut* _eventOut;
|
|
};
|
|
|
|
class ExternalSetControlOutCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
ExternalSetControlOutCommand( ControlOut* controlOut, flt32 val )
|
|
{
|
|
_controlOut = controlOut;
|
|
_val = val;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_controlOut->GetEngine( )->ExternalSetControlOut( _controlOut, _val );
|
|
}
|
|
|
|
private:
|
|
ControlOut* _controlOut;
|
|
flt32 _val;
|
|
};
|
|
|
|
class ExternalSetSwitchOutCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
ExternalSetSwitchOutCommand( SwitchOut* switchOut, int32 val )
|
|
{
|
|
_switchOut = switchOut;
|
|
_val = val;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_switchOut->GetEngine( )->ExternalSetSwitchOut( _switchOut, _val );
|
|
}
|
|
|
|
private:
|
|
SwitchOut* _switchOut;
|
|
int32 _val;
|
|
};
|
|
|
|
class ExternalSetMonoOutCommand : public Util::CommandQueue::ICommand
|
|
{
|
|
public:
|
|
ExternalSetMonoOutCommand( MonoOut* monoOut, const SoundBuffer* buffer )
|
|
{
|
|
_monoOut = monoOut;
|
|
_buffer = buffer;
|
|
}
|
|
|
|
void Execute( )
|
|
{
|
|
_monoOut->GetEngine( )->ExternalSetMonoOut( _monoOut, _buffer );
|
|
}
|
|
|
|
private:
|
|
MonoOut* _monoOut;
|
|
const SoundBuffer* _buffer;
|
|
};
|
|
}
|
|
|
|
#endif
|