Audacity
3.2.0
libraries
lib-time-and-pitch
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
13
AudioContainer::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
23
float
*
const
*
AudioContainer::Get
()
const
24
{
25
return
channelPointers
.data();
26
}
AudioContainer.h
AudioContainer::channelPointers
std::vector< float * > channelPointers
Definition:
AudioContainer.h:20
AudioContainer::AudioContainer
AudioContainer(int numSamplesPerChannel, int numChannels)
Definition:
AudioContainer.cpp:13
AudioContainer::channelVectors
std::vector< std::vector< float > > channelVectors
Definition:
AudioContainer.h:19
AudioContainer::Get
float *const * Get() const
Definition:
AudioContainer.cpp:23
Generated by
1.9.3