Audacity  2.2.2
Public Member Functions | Private Attributes | List of all members
GrowableSampleBuffer Class Reference

#include <SampleFormat.h>

Inheritance diagram for GrowableSampleBuffer:
SampleBuffer

Public Member Functions

 GrowableSampleBuffer ()
 
 GrowableSampleBuffer (size_t count, sampleFormat format)
 
GrowableSampleBufferResize (size_t count, sampleFormat format)
 
void Free ()
 

Private Attributes

size_t mCount
 

Additional Inherited Members

- Private Member Functions inherited from SampleBuffer
 SampleBuffer ()
 
 SampleBuffer (size_t count, sampleFormat format)
 
 ~SampleBuffer ()
 
SampleBufferAllocate (size_t count, sampleFormat format)
 
void Free ()
 
samplePtr ptr () const
 

Detailed Description

Definition at line 88 of file SampleFormat.h.

Constructor & Destructor Documentation

GrowableSampleBuffer::GrowableSampleBuffer ( )
inline

Definition at line 91 of file SampleFormat.h.

92  : SampleBuffer()
93  , mCount(0)
94  {}
GrowableSampleBuffer::GrowableSampleBuffer ( size_t  count,
sampleFormat  format 
)
inline

Definition at line 96 of file SampleFormat.h.

97  : SampleBuffer(count, format)
98  , mCount(count)
99  {}
int format
Definition: ExportPCM.cpp:56

Member Function Documentation

void GrowableSampleBuffer::Free ( )
inline

Definition at line 110 of file SampleFormat.h.

References SampleBuffer::Free(), and mCount.

Referenced by WaveTrackCache::Free().

111  {
113  mCount = 0;
114  }
GrowableSampleBuffer& GrowableSampleBuffer::Resize ( size_t  count,
sampleFormat  format 
)
inline

Definition at line 101 of file SampleFormat.h.

References SampleBuffer::Allocate(), mCount, and SampleBuffer::ptr().

Referenced by AudioIO::FillBuffers(), and WaveTrackCache::Get().

102  {
103  if (!ptr() || mCount < count) {
104  Allocate(count, format);
105  mCount = count;
106  }
107  return *this;
108  }
SampleBuffer & Allocate(size_t count, sampleFormat format)
Definition: SampleFormat.h:67
int format
Definition: ExportPCM.cpp:56
samplePtr ptr() const
Definition: SampleFormat.h:81

Member Data Documentation

size_t GrowableSampleBuffer::mCount
private

Definition at line 119 of file SampleFormat.h.

Referenced by Free(), and Resize().


The documentation for this class was generated from the following file: