60 |
typedef typename RTList<R*>::Iterator RTListRegionIterator; |
typedef typename RTList<R*>::Iterator RTListRegionIterator; |
61 |
typedef typename MidiKeyboardManager<V>::MidiKey MidiKey; |
typedef typename MidiKeyboardManager<V>::MidiKey MidiKey; |
62 |
|
|
63 |
|
virtual MidiKeyboardManagerBase* GetMidiKeyboardManager() OVERRIDE { |
64 |
|
return this; |
65 |
|
} |
66 |
|
|
67 |
virtual void HandBack(I* Instrument) { |
virtual void HandBack(I* Instrument) { |
68 |
ResourceManager<InstrumentManager::instrument_id_t, I>* mgr = |
ResourceManager<InstrumentManager::instrument_id_t, I>* mgr = |
69 |
dynamic_cast<ResourceManager<InstrumentManager::instrument_id_t, I>*>(pEngine->GetInstrumentManager()); |
dynamic_cast<ResourceManager<InstrumentManager::instrument_id_t, I>*>(pEngine->GetInstrumentManager()); |
289 |
template<class TV, class TRR, class TR, class TD, class TIM, class TI> friend class EngineBase; |
template<class TV, class TRR, class TR, class TD, class TIM, class TI> friend class EngineBase; |
290 |
|
|
291 |
protected: |
protected: |
292 |
EngineChannelBase() : InstrumentChangeCommandReader(InstrumentChangeCommand) { |
EngineChannelBase() : |
293 |
|
MidiKeyboardManager<V>(this), |
294 |
|
InstrumentChangeCommandReader(InstrumentChangeCommand) |
295 |
|
{ |
296 |
pInstrument = NULL; |
pInstrument = NULL; |
297 |
|
|
298 |
// reset the instrument change command struct (need to be done |
// reset the instrument change command struct (need to be done |
391 |
void UnloadScriptInUse() { |
void UnloadScriptInUse() { |
392 |
{ |
{ |
393 |
InstrumentChangeCmd<R, I>& cmd = InstrumentChangeCommand.GetConfigForUpdate(); |
InstrumentChangeCmd<R, I>& cmd = InstrumentChangeCommand.GetConfigForUpdate(); |
394 |
if (cmd.pScript) pScript->unload(); |
if (cmd.pScript) cmd.pScript->unload(); |
395 |
} |
} |
396 |
{ |
{ |
397 |
InstrumentChangeCmd<R, I>& cmd = InstrumentChangeCommand.SwitchConfig(); |
InstrumentChangeCmd<R, I>& cmd = InstrumentChangeCommand.SwitchConfig(); |
398 |
if (cmd.pScript) pScript->unload(); |
if (cmd.pScript) cmd.pScript->unload(); |
399 |
} |
} |
400 |
|
InstrumentChangeCommand.SwitchConfig(); // switch back to original one |
401 |
} |
} |
402 |
|
|
403 |
/** |
/** |