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

Diff of /linuxsampler/trunk/src/engines/common/SignalUnitRack.h

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

revision 2296 by iliev, Thu Dec 8 20:03:47 2011 UTC revision 2297 by iliev, Fri Dec 9 15:04:55 2011 UTC
# Line 115  namespace LinuxSampler { Line 115  namespace LinuxSampler {
115      class SignalUnitRack {      class SignalUnitRack {
116          protected:          protected:
117              uint CurrentStep; // The current time step              uint CurrentStep; // The current time step
118              bool bHasEq;              bool bHasEq, releaseStageEntered;
119    
120          public:          public:
121              FixedArray<SignalUnit*> Units; // A list of all signal units in this rack              FixedArray<SignalUnit*> Units; // A list of all signal units in this rack
# Line 123  namespace LinuxSampler { Line 123  namespace LinuxSampler {
123              /**              /**
124               * @param maxUnitCount We are using fixed size array because of the real-time safe requirements.               * @param maxUnitCount We are using fixed size array because of the real-time safe requirements.
125               */               */
126              SignalUnitRack(int maxUnitCount): CurrentStep(0), bHasEq(false), Units(maxUnitCount) { }              SignalUnitRack(int maxUnitCount): CurrentStep(0), bHasEq(false),
127                                                  releaseStageEntered(false), Units(maxUnitCount) { }
128                            
129              uint GetCurrentStep() { return CurrentStep; }              uint GetCurrentStep() { return CurrentStep; }
130    
# Line 152  namespace LinuxSampler { Line 153  namespace LinuxSampler {
153                            
154              /** Initializes and triggers the rack. */              /** Initializes and triggers the rack. */
155              virtual void Trigger() {              virtual void Trigger() {
156                    releaseStageEntered = false;
157                  CurrentStep = 0;                  CurrentStep = 0;
158                  for (int i = 0; i < Units.size(); i++) {                  for (int i = 0; i < Units.size(); i++) {
159                      Units[i]->Trigger();                      Units[i]->Trigger();
# Line 163  namespace LinuxSampler { Line 165  namespace LinuxSampler {
165               * called when the voice enter the release stage.               * called when the voice enter the release stage.
166               */               */
167              virtual void EnterReleaseStage() {              virtual void EnterReleaseStage() {
168                    releaseStageEntered = true;
169                  for (int i = 0; i < Units.size(); i++) {                  for (int i = 0; i < Units.size(); i++) {
170                      Units[i]->EnterReleaseStage();                      Units[i]->EnterReleaseStage();
171                  }                  }
172              }              }
173                            
174                bool isReleaseStageEntered() { return releaseStageEntered; }
175                
176              /**              /**
177               * When the rack belongs to a voice, this method is               * When the rack belongs to a voice, this method is
178               * called when the voice is of type which ignore note off.               * called when the voice is of type which ignore note off.

Legend:
Removed from v.2296  
changed lines
  Added in v.2297

  ViewVC Help
Powered by ViewVC