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

Diff of /linuxsampler/trunk/src/engines/sf2/Stream.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 3054 by schoenebeck, Thu Dec 15 12:47:45 2016 UTC
# Line 4  Line 4 
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck    *   *   Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck    *
6   *   Copyright (C) 2005-2009 Christian Schoenebeck                         *   *   Copyright (C) 2005-2009 Christian Schoenebeck                         *
7   *   Copyright (C) 2009 Grigor Iliev                                       *   *   Copyright (C) 2009-2015 Christian Schoenebeck and Grigor Iliev        *
8   *                                                                         *   *                                                                         *
9   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
10   *   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 49  namespace LinuxSampler { namespace sf2 { Line 49  namespace LinuxSampler { namespace sf2 {
49              pbs.reverse = PlaybackState.reverse;              pbs.reverse = PlaybackState.reverse;
50              pbs.loop_cycles_left = PlaybackState.loop_cycles_left;              pbs.loop_cycles_left = PlaybackState.loop_cycles_left;
51    
52              total_readsamples  = pSample->ReadAndLoop(pBuf, SamplesToRead, &pbs);              total_readsamples  = pSample->ReadAndLoop(pBuf, SamplesToRead, &pbs, pRegion);
53              PlaybackState.position = pbs.position;              PlaybackState.position = pbs.position;
54              PlaybackState.reverse = pbs.reverse;              PlaybackState.reverse = pbs.reverse;
55              PlaybackState.loop_cycles_left = pbs.loop_cycles_left;              PlaybackState.loop_cycles_left = pbs.loop_cycles_left;
56              endofsamplereached = (this->PlaybackState.position >= pSample->GetTotalFrameCount());              endofsamplereached = (this->PlaybackState.position >= pSample->GetTotalFrameCount());
57              dmsg(5,("Refilled stream %d with %d (SamplePos: %d)", this->hThis, total_readsamples, this->PlaybackState.position));              dmsg(5,("Refilled stream %d with %ld (SamplePos: %lu)", this->hThis, total_readsamples, this->PlaybackState.position));
58          }          }
59          else { // normal forward playback          else { // normal forward playback
60    
# Line 70  namespace LinuxSampler { namespace sf2 { Line 70  namespace LinuxSampler { namespace sf2 {
70              this->SampleOffset = pSample->GetPos();              this->SampleOffset = pSample->GetPos();
71    
72              endofsamplereached = (SampleOffset >= pSample->GetTotalFrameCount());              endofsamplereached = (SampleOffset >= pSample->GetTotalFrameCount());
73              dmsg(5,("Refilled stream %d with %d (SamplePos: %d)", this->hThis, total_readsamples, this->SampleOffset));              dmsg(5,("Refilled stream %d with %ld (SamplePos: %lu)", this->hThis, total_readsamples, this->SampleOffset));
74          }          }
75    
76          // update stream state          // update stream state
# Line 95  namespace LinuxSampler { namespace sf2 { Line 95  namespace LinuxSampler { namespace sf2 {
95          info.ChannelsPerFrame = pRgn->pSample->GetChannelCount();          info.ChannelsPerFrame = pRgn->pSample->GetChannelCount();
96          info.FrameSize        = pRgn->pSample->GetFrameSize();          info.FrameSize        = pRgn->pSample->GetFrameSize();
97          info.BytesPerSample   = pRgn->pSample->GetFrameSize() / pRgn->pSample->GetChannelCount();          info.BytesPerSample   = pRgn->pSample->GetFrameSize() / pRgn->pSample->GetChannelCount();
98          info.TotalSampleCount = pRgn->pSample->GetTotalFrameCount();          info.TotalSampleCount = (int)pRgn->pSample->GetTotalFrameCount();
99    
100          Sample::PlaybackState playbackState;          Sample::PlaybackState playbackState;
101          playbackState.position         = SampleOffset;          playbackState.position         = SampleOffset;

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

  ViewVC Help
Powered by ViewVC