/[svn]/linuxsampler/trunk/src/engines/gig/Stream.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/Stream.h

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

revision 53 by schoenebeck, Mon Apr 26 17:15:51 2004 UTC revision 505 by schoenebeck, Tue May 3 01:00:25 2005 UTC
# Line 2  Line 2 
2   *                                                                         *   *                                                                         *
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003 by Benno Senoner                                   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6     *   Copyright (C) 2005 Christian Schoenebeck                              *
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 29  Line 30 
30  # warning Stream.h included  # warning Stream.h included
31  #endif // DEBUG_HEADERS  #endif // DEBUG_HEADERS
32    
33    #include <gig.h>
34    
35  #include "../../common/RingBuffer.h"  #include "../../common/RingBuffer.h"
 #include "../../lib/fileloader/libgig/gig.h"  
36    
37  namespace LinuxSampler { namespace gig {  namespace LinuxSampler { namespace gig {
38    
# Line 52  namespace LinuxSampler { namespace gig { Line 54  namespace LinuxSampler { namespace gig {
54              };              };
55    
56              // Methods              // Methods
57              Stream(uint BufferSize, uint BufferWrapElements);              Stream( ::gig::buffer_t* pDecompressionBuffer, uint BufferSize, uint BufferWrapElements);
58             ~Stream();              virtual ~Stream();
59              int  ReadAhead(unsigned long SampleCount);              int  ReadAhead(unsigned long SampleCount);
60              void WriteSilence(unsigned long SilenceSampleWords);              void WriteSilence(unsigned long SilenceSampleWords);
61    
62              inline int GetReadSpace() {              inline int GetReadSpace() {
63                  return (pRingBuffer && State == state_active) ? pRingBuffer->read_space()  : 0;                  return (pRingBuffer && State != state_unused) ? pRingBuffer->read_space()  : 0;
64              }              }
65    
66              inline int GetWriteSpace() {              inline int GetWriteSpace() {
# Line 112  namespace LinuxSampler { namespace gig { Line 114  namespace LinuxSampler { namespace gig {
114              ::gig::playback_state_t  PlaybackState;              ::gig::playback_state_t  PlaybackState;
115              RingBuffer<sample_t>*    pRingBuffer;              RingBuffer<sample_t>*    pRingBuffer;
116              bool                     DoLoop;              bool                     DoLoop;
117                ::gig::buffer_t*         pDecompressionBuffer;
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                static uint              TotalStreams; //< Reflects how many stream objects currently exist.
122    
123              // Methods              // Methods
124              inline void Reset() {              inline void Reset() {

Legend:
Removed from v.53  
changed lines
  Added in v.505

  ViewVC Help
Powered by ViewVC