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

#include <SampleFormat.h>

Inheritance diagram for GrowableSampleBuffer:
[legend]
Collaboration diagram for GrowableSampleBuffer:
[legend]

Public Member Functions

 GrowableSampleBuffer ()
 
 GrowableSampleBuffer (size_t count, sampleFormat format)
 
GrowableSampleBufferResize (size_t count, sampleFormat format)
 
void Free ()
 
samplePtr ptr () const
 

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 105 of file SampleFormat.h.

Constructor & Destructor Documentation

◆ GrowableSampleBuffer() [1/2]

GrowableSampleBuffer::GrowableSampleBuffer ( )
inline

Definition at line 108 of file SampleFormat.h.

109  : SampleBuffer()
110  , mCount(0)
111  {}

◆ GrowableSampleBuffer() [2/2]

GrowableSampleBuffer::GrowableSampleBuffer ( size_t  count,
sampleFormat  format 
)
inline

Definition at line 113 of file SampleFormat.h.

114  : SampleBuffer(count, format)
115  , mCount(count)
116  {}

Member Function Documentation

◆ Free()

void GrowableSampleBuffer::Free ( )
inline

Definition at line 127 of file SampleFormat.h.

128  {
130  mCount = 0;
131  }

References SampleBuffer::Free(), and mCount.

Referenced by WaveTrackCache::Free().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ptr()

samplePtr SampleBuffer::ptr
inline

Definition at line 98 of file SampleFormat.h.

98 { return mPtr; }

References SampleBuffer::mPtr.

Referenced by WaveTrackCache::GetFloats(), and Resize().

Here is the caller graph for this function:

◆ Resize()

GrowableSampleBuffer& GrowableSampleBuffer::Resize ( size_t  count,
sampleFormat  format 
)
inline

Definition at line 118 of file SampleFormat.h.

119  {
120  if (!ptr() || mCount < count) {
121  Allocate(count, format);
122  mCount = count;
123  }
124  return *this;
125  }

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

Referenced by WaveTrackCache::GetFloats().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mCount

size_t GrowableSampleBuffer::mCount
private

Definition at line 136 of file SampleFormat.h.

Referenced by Free(), and Resize().


The documentation for this class was generated from the following file:
SampleBuffer::Allocate
SampleBuffer & Allocate(size_t count, sampleFormat format)
Definition: SampleFormat.h:84
GrowableSampleBuffer::ptr
samplePtr ptr() const
Definition: SampleFormat.h:98
SampleBuffer::SampleBuffer
SampleBuffer()
Definition: SampleFormat.h:72
SampleBuffer::Free
void Free()
Definition: SampleFormat.h:92
GrowableSampleBuffer::mCount
size_t mCount
Definition: SampleFormat.h:136
format
int format
Definition: ExportPCM.cpp:56
SampleBuffer::mPtr
samplePtr mPtr
Definition: SampleFormat.h:102