/[svn]/linuxsampler/trunk/src/common/RingBuffer.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/RingBuffer.h

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

revision 294 by schoenebeck, Mon Oct 25 15:21:43 2004 UTC revision 361 by schoenebeck, Wed Feb 9 01:22:18 2005 UTC
# Line 254  public: Line 254  public:
254       * allows to read from a RingBuffer without being forced to free read       * allows to read from a RingBuffer without being forced to free read
255       * data while reading / positioning.       * data while reading / positioning.
256       */       */
257      template<class _T>      template<class T1>
258      class _NonVolatileReader {      class _NonVolatileReader {
259          public:          public:
260              int read_space() {              int read_space() {
# Line 363  public: Line 363  public:
363              }              }
364    
365          protected:          protected:
366              _NonVolatileReader(RingBuffer<_T>* pBuf) {              _NonVolatileReader(RingBuffer<T1>* pBuf) {
367                  this->pBuf     = pBuf;                  this->pBuf     = pBuf;
368                  this->read_ptr = atomic_read(&pBuf->read_ptr);                  this->read_ptr = atomic_read(&pBuf->read_ptr);
369              }              }
370    
371              RingBuffer<_T>* pBuf;              RingBuffer<T1>* pBuf;
372              int read_ptr;              int read_ptr;
373    
374              friend class RingBuffer<_T>;              friend class RingBuffer<T1>;
375      };      };
376    
377      typedef _NonVolatileReader<T> NonVolatileReader;      typedef _NonVolatileReader<T> NonVolatileReader;

Legend:
Removed from v.294  
changed lines
  Added in v.361

  ViewVC Help
Powered by ViewVC