/[svn]/linuxsampler/trunk/src/stream.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/stream.h

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

revision 25 by schoenebeck, Sun Dec 7 05:03:43 2003 UTC revision 26 by schoenebeck, Fri Dec 26 16:39:58 2003 UTC
# Line 100  class Stream { Line 100  class Stream {
100          inline static uint       GetUnusedStreams() { return UnusedStreams; }          inline static uint       GetUnusedStreams() { return UnusedStreams; }
101      protected:      protected:
102          // Methods          // Methods
103          void                     Launch(Stream::Handle hStream, reference_t* pExportReference, gig::Sample* pSample, unsigned long SampleOffset);          void                     Launch(Stream::Handle hStream, reference_t* pExportReference, gig::Sample* pSample, unsigned long SampleOffset, bool DoLoop);
104          inline void              Kill()      { pExportReference = NULL; Reset(); } ///< Will be called by disk thread after a 'deletion' command from the audio thread (within the voice class)          inline void              Kill()      { pExportReference = NULL; Reset(); } ///< Will be called by disk thread after a 'deletion' command from the audio thread (within the voice class)
105          inline Stream::Handle    GetHandle() { return hThis; }          inline Stream::Handle    GetHandle() { return hThis; }
106          inline Stream::state_t   GetState()  { return State; }          inline Stream::state_t   GetState()  { return State; }
# Line 110  class Stream { Line 110  class Stream {
110          reference_t*             pExportReference;          reference_t*             pExportReference;
111          state_t                  State;          state_t                  State;
112          Stream::Handle           hThis;          Stream::Handle           hThis;
         gig::Sample*             pSample;  
113          unsigned long            SampleOffset;          unsigned long            SampleOffset;
114            gig::Sample*             pSample;
115            gig::playback_state_t    PlaybackState;
116          RingBuffer<sample_t>*    pRingBuffer;          RingBuffer<sample_t>*    pRingBuffer;
117            bool                     DoLoop;
118    
119          // Static Attributes          // Static Attributes
120          static uint              UnusedStreams; //< Reflects how many stream objects of all stream instances are currently not in use.          static uint              UnusedStreams; //< Reflects how many stream objects of all stream instances are currently not in use.
121    
122          // Methods          // Methods
123          inline void Reset() {          inline void Reset() {
124              pSample      = NULL;              SampleOffset                   = 0;
125              SampleOffset = 0;              pSample                        = NULL;
126              hThis        = 0;              PlaybackState.position         = 0;
127                PlaybackState.reverse          = false;
128                hThis                          = 0;
129              pRingBuffer->init(); // reset ringbuffer              pRingBuffer->init(); // reset ringbuffer
130              if (State != state_unused) {              if (State != state_unused) {
131                  // we can't do 'SetPos(state_unused)' here, due to possible race conditions)                  // we can't do 'SetPos(state_unused)' here, due to possible race conditions)

Legend:
Removed from v.25  
changed lines
  Added in v.26

  ViewVC Help
Powered by ViewVC