/[svn]/linuxsampler/trunk/src/engines/EngineChannelBase.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/EngineChannelBase.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2612 by schoenebeck, Tue Jun 10 13:32:16 2014 UTC revision 2645 by schoenebeck, Wed Jun 18 00:14:57 2014 UTC
# Line 60  namespace LinuxSampler { Line 60  namespace LinuxSampler {
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());
# Line 285  namespace LinuxSampler { Line 289  namespace LinuxSampler {
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
# Line 384  namespace LinuxSampler { Line 391  namespace LinuxSampler {
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              /**              /**

Legend:
Removed from v.2612  
changed lines
  Added in v.2645

  ViewVC Help
Powered by ViewVC