/[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 2613 by schoenebeck, Tue Jun 10 15:17:01 2014 UTC revision 2837 by persson, Sun Aug 23 06:14:00 2015 UTC
# Line 4  Line 4 
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck    *   *   Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck    *
6   *   Copyright (C) 2005-2008 Christian Schoenebeck                         *   *   Copyright (C) 2005-2008 Christian Schoenebeck                         *
7   *   Copyright (C) 2009-2013 Christian Schoenebeck and Grigor Iliev        *   *   Copyright (C) 2009-2015 Christian Schoenebeck and Grigor Iliev        *
8   *                                                                         *   *                                                                         *
9   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
10   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 39  namespace LinuxSampler { Line 39  namespace LinuxSampler {
39              bool bChangeInstrument;       ///< Set to true by the loader when the channel should change instrument.              bool bChangeInstrument;       ///< Set to true by the loader when the channel should change instrument.
40              I* pInstrument;               ///< The new instrument. Also used by the loader to read the previously loaded instrument.              I* pInstrument;               ///< The new instrument. Also used by the loader to read the previously loaded instrument.
41              RTList<R*>* pRegionsInUse; ///< List of dimension regions in use by the currently loaded instrument. Continuously updated by the audio thread.              RTList<R*>* pRegionsInUse; ///< List of dimension regions in use by the currently loaded instrument. Continuously updated by the audio thread.
42              InstrumentScript* pScript; ///< Instrument script to be executed for this instrument, or NULL if instrument does not have a script.              InstrumentScript* pScript; ///< Instrument script to be executed for this instrument. This is never NULL, it is always a valid InstrumentScript pointer. Use InstrumentScript::bHasValidScript whether it reflects a valid instrument script to be executed.
43      };      };
44    
45      template<class R>      template<class R>
# Line 271  namespace LinuxSampler { Line 271  namespace LinuxSampler {
271               */               */
272              virtual void OnResourceProgress(float fProgress) OVERRIDE {              virtual void OnResourceProgress(float fProgress) OVERRIDE {
273                  this->InstrumentStat = int(fProgress * 100.0f);                  this->InstrumentStat = int(fProgress * 100.0f);
274                  dmsg(7,("EngineChannelBase: progress %d%", InstrumentStat));                  dmsg(7,("EngineChannelBase: progress %d%%", InstrumentStat));
275                  bStatusChanged = true; // status of engine has changed, so set notify flag                  bStatusChanged = true; // status of engine has changed, so set notify flag
276              }              }
277    
# Line 289  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 388  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.2613  
changed lines
  Added in v.2837

  ViewVC Help
Powered by ViewVC