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

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

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

revision 2020 by iliev, Fri Oct 23 17:53:17 2009 UTC revision 2021 by iliev, Fri Oct 30 16:36:20 2009 UTC
# Line 39  namespace LinuxSampler { namespace sfz { Line 39  namespace LinuxSampler { namespace sfz {
39      }      }
40    
41      long Stream::Read(uint8_t* pBuf, long SamplesToRead) {      long Stream::Read(uint8_t* pBuf, long SamplesToRead) {
42          Sample* pSample = pRegion->pSample;          ::sfz::Sample* pSample = pRegion->pSample;
43          long total_readsamples = 0, readsamples = 0;          long total_readsamples = 0, readsamples = 0;
44          bool endofsamplereached;          bool endofsamplereached;
45    
46          // refill the disk stream buffer          // refill the disk stream buffer
47          if (this->DoLoop) { // honor looping          if (this->DoLoop) { // honor looping
48              total_readsamples  = pSample->ReadAndLoop(pBuf, SamplesToRead, &PlaybackState);              total_readsamples  = pSample->ReadAndLoop(pBuf, SamplesToRead, &PlaybackState, pRegion);
49              endofsamplereached = (this->PlaybackState.position >= pSample->GetTotalFrameCount());              endofsamplereached = (this->PlaybackState.position >= pSample->GetTotalFrameCount());
50              dmsg(5,("Refilled stream %d with %d (SamplePos: %d)", this->hThis, total_readsamples, this->PlaybackState.position));              dmsg(5,("Refilled stream %d with %d (SamplePos: %d)", this->hThis, total_readsamples, this->PlaybackState.position));
51          }          }

Legend:
Removed from v.2020  
changed lines
  Added in v.2021

  ViewVC Help
Powered by ViewVC