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

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

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

revision 2166 by persson, Thu Aug 12 15:36:15 2010 UTC revision 2167 by persson, Mon Feb 21 17:34:36 2011 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2008 Anders Dahnielson <anders@dahnielson.com>          *   *   Copyright (C) 2008 Anders Dahnielson <anders@dahnielson.com>          *
6   *   Copyright (C) 2009 - 2010 Anders Dahnielson and Grigor Iliev          *   *   Copyright (C) 2009 - 2011 Anders Dahnielson and Grigor Iliev          *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 149  namespace sfz Line 149  namespace sfz
149      }      }
150    
151      bool Region::HasLoop() {      bool Region::HasLoop() {
152          bool b = loop_mode == ::sfz::LOOP_CONTINUOUS || loop_mode == ::sfz::LOOP_SUSTAIN; // TODO: ONE_SHOT mode          bool b = loop_mode == ::sfz::LOOP_UNSET ? pSample->GetLoops() :
153                (loop_mode == ::sfz::LOOP_CONTINUOUS || loop_mode == ::sfz::LOOP_SUSTAIN);
154          return b && GetLoopStart() && GetLoopEnd() && GetLoopEnd() > GetLoopStart();          return b && GetLoopStart() && GetLoopEnd() && GetLoopEnd() > GetLoopStart();
155      }      }
156    
157      uint Region::GetLoopStart() {      uint Region::GetLoopStart() {
158          return (!loop_start) ? 0 : *loop_start; // TODO: use sample loop when loop_start not defined          return (!loop_start) ? pSample->GetLoopStart() : *loop_start;
159      }      }
160    
161      uint Region::GetLoopEnd() {      uint Region::GetLoopEnd() {
162          return (!loop_end) ? 0 : *loop_end; // TODO: use sample loop when loop_end not defined          return (!loop_end) ? pSample->GetLoopEnd() : *loop_end;
163      }      }
164    
165      uint Region::GetLoopCount() {      uint Region::GetLoopCount() {
# Line 284  namespace sfz Line 285  namespace sfz
285          end.unset();          end.unset();
286          loop_crossfade.unset();          loop_crossfade.unset();
287          offset.unset(); offset_random.unset();          offset.unset(); offset_random.unset();
288          loop_mode = NO_LOOP;          loop_mode = LOOP_UNSET;
289          loop_start.unset(); loop_end.unset();          loop_start.unset(); loop_end.unset();
290          sync_beats.unset(); sync_offset.unset();          sync_beats.unset(); sync_offset.unset();
291    

Legend:
Removed from v.2166  
changed lines
  Added in v.2167

  ViewVC Help
Powered by ViewVC