/[svn]/linuxsampler/trunk/src/engines/sfz/Voice.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/sfz/Voice.cpp

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

revision 2215 by persson, Sat Jul 9 16:44:27 2011 UTC revision 2216 by iliev, Mon Jul 25 17:21:16 2011 UTC
# Line 71  namespace LinuxSampler { namespace sfz { Line 71  namespace LinuxSampler { namespace sfz {
71          ri.UnityNote = pRegion->pitch_keycenter;          ri.UnityNote = pRegion->pitch_keycenter;
72          ri.FineTune  = pRegion->tune + pRegion->transpose * 100;          ri.FineTune  = pRegion->tune + pRegion->transpose * 100;
73          ri.Pan       = int(pRegion->pan * 0.63); // convert from -100..100 to -64..63          ri.Pan       = int(pRegion->pan * 0.63); // convert from -100..100 to -64..63
74          ri.SampleStartOffset = 0; // TODO:          ri.SampleStartOffset = pRegion->offset ? *(pRegion->offset) : 0;
75    
76          ri.EG2PreAttack        = pRegion->fileg_start * 10;          ri.EG2PreAttack        = pRegion->fileg_start * 10;
77          ri.EG2Attack           = pRegion->fileg_attack;          ri.EG2Attack           = pRegion->fileg_attack;
# Line 521  namespace LinuxSampler { namespace sfz { Line 521  namespace LinuxSampler { namespace sfz {
521              }              }
522          }          }
523      }      }
524        
525        void Voice::SetSampleStartOffset() {
526            if (DiskVoice && RgnInfo.SampleStartOffset > pSample->MaxOffset) {
527                // The offset is applied to the RAM buffer
528                finalSynthesisParameters.dPos = 0;
529                Pos = 0;
530            } else {
531                finalSynthesisParameters.dPos = RgnInfo.SampleStartOffset; // offset where we should start playback of sample
532                Pos = RgnInfo.SampleStartOffset;
533            }
534        }
535    
536  }} // namespace LinuxSampler::sfz  }} // namespace LinuxSampler::sfz

Legend:
Removed from v.2215  
changed lines
  Added in v.2216

  ViewVC Help
Powered by ViewVC