Audacity 3.2.0
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 ()
 
 SampleBuffer (SampleBuffer &&other)
 
SampleBufferoperator= (SampleBuffer &&other)
 
SampleBufferAllocate (size_t count, sampleFormat format)
 
void Free ()
 
samplePtr ptr () const
 

Detailed Description

Definition at line 172 of file SampleFormat.h.

Constructor & Destructor Documentation

◆ GrowableSampleBuffer() [1/2]

GrowableSampleBuffer::GrowableSampleBuffer ( )
inline

Definition at line 175 of file SampleFormat.h.

176 : SampleBuffer()
177 , mCount(0)
178 {}

◆ GrowableSampleBuffer() [2/2]

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

Definition at line 180 of file SampleFormat.h.

181 : SampleBuffer(count, format)
182 , mCount(count)
183 {}

Member Function Documentation

◆ Free()

void GrowableSampleBuffer::Free ( )
inline

Definition at line 194 of file SampleFormat.h.

195 {
197 mCount = 0;
198 }

References SampleBuffer::Free(), and mCount.

Here is the call graph for this function:

◆ ptr()

samplePtr SampleBuffer::ptr ( ) const
inline

Definition at line 165 of file SampleFormat.h.

165{ return mPtr; }
samplePtr mPtr
Definition: SampleFormat.h:169

Referenced by Resize().

Here is the caller graph for this function:

◆ Resize()

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

Definition at line 185 of file SampleFormat.h.

186 {
187 if (!ptr() || mCount < count) {
188 Allocate(count, format);
189 mCount = count;
190 }
191 return *this;
192 }
samplePtr ptr() const
Definition: SampleFormat.h:165
SampleBuffer & Allocate(size_t count, sampleFormat format)
Definition: SampleFormat.h:151

References SampleBuffer::Allocate(), anonymous_namespace{ExportPCM.cpp}::format, mCount, and ptr().

Here is the call graph for this function:

Member Data Documentation

◆ mCount

size_t GrowableSampleBuffer::mCount
private

Definition at line 203 of file SampleFormat.h.

Referenced by Free(), and Resize().


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