Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
AudioContainer Struct Referencefinal

#include <AudioContainer.h>

Collaboration diagram for AudioContainer:
[legend]

Public Member Functions

 AudioContainer (int numSamplesPerChannel, int numChannels)
 
float *const * Get () const
 

Public Attributes

std::vector< std::vector< float > > channelVectors
 
std::vector< float * > channelPointers
 

Detailed Description


Audacity: A Digital Audio Editor

AudioContainer.h

Matthieu Hodgkinson

Definition at line 15 of file AudioContainer.h.

Constructor & Destructor Documentation

◆ AudioContainer()

AudioContainer::AudioContainer ( int  numSamplesPerChannel,
int  numChannels 
)

Audacity: A Digital Audio Editor

AudioContainer.cpp

Matthieu Hodgkinson

Definition at line 13 of file AudioContainer.cpp.

14{
15 for (auto i = 0; i < numChannels; ++i)
16 {
17 const auto channelData =
18 channelVectors.emplace_back(numSamplesPerChannel).data();
19 channelPointers.push_back(channelData);
20 }
21}
std::vector< float * > channelPointers
std::vector< std::vector< float > > channelVectors

References channelPointers, and channelVectors.

Member Function Documentation

◆ Get()

float *const * AudioContainer::Get ( ) const

Definition at line 23 of file AudioContainer.cpp.

24{
25 return channelPointers.data();
26}

References channelPointers.

Referenced by anonymous_namespace{WaveTrack.cpp}::GetRenderedCopy(), StaffPadTimeAndPitch::GetSamples(), StaffPadTimeAndPitch::InitializeStretcher(), and TEST_CASE().

Here is the caller graph for this function:

Member Data Documentation

◆ channelPointers

std::vector<float*> AudioContainer::channelPointers

Definition at line 20 of file AudioContainer.h.

Referenced by AudioContainer(), Get(), AudioContainerHelper::GetData(), and TEST_CASE().

◆ channelVectors

std::vector<std::vector<float> > AudioContainer::channelVectors

Definition at line 19 of file AudioContainer.h.

Referenced by AudioContainer(), and TEST_CASE().


The documentation for this struct was generated from the following files: