/[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 2015 by iliev, Sun Oct 25 22:22:52 2009 UTC revision 2032 by persson, Fri Nov 20 20:13:08 2009 UTC
# Line 113  namespace LinuxSampler { Line 113  namespace LinuxSampler {
113          // calculate volume          // calculate volume
114          const double velocityAttenuation = GetVelocityAttenuation(itNoteOnEvent->Param.Note.Velocity);          const double velocityAttenuation = GetVelocityAttenuation(itNoteOnEvent->Param.Note.Velocity);
115          float volume = CalculateVolume(velocityAttenuation);          float volume = CalculateVolume(velocityAttenuation);
116            if (volume <= 0) return -1;
117    
118          // select channel mode (mono or stereo)          // select channel mode (mono or stereo)
119          SYNTHESIS_MODE_SET_CHANNELS(SynthesisMode, SmplInfo.ChannelCount == 2);          SYNTHESIS_MODE_SET_CHANNELS(SynthesisMode, SmplInfo.ChannelCount == 2);
# Line 608  namespace LinuxSampler { Line 609  namespace LinuxSampler {
609                  GetNoteOnTime(MIDIKey) ) / GetEngine()->SampleRate;                  GetNoteOnTime(MIDIKey) ) / GetEngine()->SampleRate;
610    
611              float attenuation = 1 - 0.01053 * (256 >> RgnInfo.ReleaseTriggerDecay) * noteLength;              float attenuation = 1 - 0.01053 * (256 >> RgnInfo.ReleaseTriggerDecay) * noteLength;
             if (attenuation <= 0) return -1;  
612              volume *= attenuation;              volume *= attenuation;
613          }          }
614    

Legend:
Removed from v.2015  
changed lines
  Added in v.2032

  ViewVC Help
Powered by ViewVC