Audacity 3.2.0
AudioContainer.cpp
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 AudioContainer.cpp
7
8 Matthieu Hodgkinson
9
10**********************************************************************/
11#include "AudioContainer.h"
12
13AudioContainer::AudioContainer(int numSamplesPerChannel, int numChannels)
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}
22
23float* const* AudioContainer::Get() const
24{
25 return channelPointers.data();
26}
std::vector< float * > channelPointers
AudioContainer(int numSamplesPerChannel, int numChannels)
std::vector< std::vector< float > > channelVectors
float *const * Get() const