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

Diff of /linuxsampler/trunk/src/engines/gig/EGADSR.h

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

revision 239 by schoenebeck, Sun Sep 12 14:48:19 2004 UTC revision 284 by schoenebeck, Thu Oct 14 21:24:39 2004 UTC
# Line 27  Line 27 
27    
28  #include "../../common/global.h"  #include "../../common/global.h"
29  #include "../../common/RTMath.h"  #include "../../common/RTMath.h"
30  #include "../../common/RTELMemoryPool.h"  #include "../../common/Pool.h"
31  #include "../common/Event.h"  #include "../common/Event.h"
32  #include "Manipulator.h"  #include "Manipulator.h"
33  #include "Engine.h"  #include "Engine.h"
34    
35  #define EG_ENVELOPE_LIMIT       0.001  #define EG_ENVELOPE_LIMIT       0.001
36  #define EG_MIN_RELEASE_TIME     0.005  #define EG_MIN_RELEASE_TIME     0.0025
37    
38  namespace LinuxSampler { namespace gig {  namespace LinuxSampler { namespace gig {
39    
# Line 53  class EGADSR { Line 53  class EGADSR {
53              stage_decay2,              stage_decay2,
54              stage_sustain,              stage_sustain,
55              stage_release,              stage_release,
56                stage_fadeout,
57              stage_end              stage_end
58          };          };
59    
60          EGADSR(gig::Engine* pEngine, Event::destination_t ModulationDestination);          EGADSR(gig::Engine* pEngine, Event::destination_t ModulationDestination);
61          void Process(uint TotalSamples, RTEList<Event>* pEvents, Event* pTriggerEvent, double SamplePos, double CurrentPitch, Event* pKillEvent = NULL);          void Process(uint TotalSamples, RTList<Event>* pEvents, RTList<Event>::Iterator itTriggerEvent, double SamplePos, double CurrentPitch, RTList<Event>::Iterator itKillEvent = RTList<Event>::Iterator());
62          void Trigger(uint PreAttack, double AttackTime, bool HoldAttack, long LoopStart, double Decay1Time, double Decay2Time, bool InfiniteSustain, uint SustainLevel, double ReleaseTime, uint Delay);          void Trigger(uint PreAttack, double AttackTime, bool HoldAttack, long LoopStart, double Decay1Time, double Decay2Time, bool InfiniteSustain, uint SustainLevel, double ReleaseTime, uint Delay);
63          inline EGADSR::stage_t GetStage() { return Stage; }          inline EGADSR::stage_t GetStage() { return Stage; }
64      protected:      protected:
# Line 78  class EGADSR { Line 79  class EGADSR {
79          float   ReleaseCoeff;          float   ReleaseCoeff;
80          long    ReleaseStepsLeft;  ///< number of sample points til end of release stage          long    ReleaseStepsLeft;  ///< number of sample points til end of release stage
81          bool    ReleasePostponed;  ///< If a "release" event occured in the previous audio fragment, but wasn't processed yet.          bool    ReleasePostponed;  ///< If a "release" event occured in the previous audio fragment, but wasn't processed yet.
82          const static float EndCoeff;          const static float FadeOutCoeff;
83      private:      private:
84          static float CalculateEndCoeff();          static float CalculateFadeOutCoeff();
85  };  };
86    
87  }} // namespace LinuxSampler::gig  }} // namespace LinuxSampler::gig

Legend:
Removed from v.239  
changed lines
  Added in v.284

  ViewVC Help
Powered by ViewVC