/[svn]/linuxsampler/trunk/src/engines/common/AbstractVoice.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/AbstractVoice.cpp

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

revision 2060 by persson, Sat Jan 30 10:30:02 2010 UTC revision 2061 by persson, Tue Feb 23 18:32:31 2010 UTC
# Line 600  namespace LinuxSampler { Line 600  namespace LinuxSampler {
600              float noteLength = float(GetEngine()->FrameTime + Delay -              float noteLength = float(GetEngine()->FrameTime + Delay -
601                  GetNoteOnTime(MIDIKey) ) / GetEngine()->SampleRate;                  GetNoteOnTime(MIDIKey) ) / GetEngine()->SampleRate;
602    
603              float attenuation = 1 - 0.01053 * (256 >> RgnInfo.ReleaseTriggerDecay) * noteLength;              volume *= GetReleaseTriggerAttenuation(noteLength);
             volume *= attenuation;  
604          }          }
605    
606          return volume;          return volume;
607      }      }
608    
609        float AbstractVoice::GetReleaseTriggerAttenuation(float noteLength) {
610            return 1 - RgnInfo.ReleaseTriggerDecay * noteLength;
611        }
612  } // namespace LinuxSampler  } // namespace LinuxSampler

Legend:
Removed from v.2060  
changed lines
  Added in v.2061

  ViewVC Help
Powered by ViewVC