Audacity
3.2.0
libraries
lib-wave-track-paint
waveform
WaveData.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
WaveData.h
7
8
Dmitry Vedenko
9
10
**********************************************************************/
11
#include "
WaveData.h
"
12
13
WaveformDisplay::WaveformDisplay
(
int
w)
14
: width(w)
15
{
16
}
17
18
void
WaveformDisplay::AppendColumns
(
19
const
WaveDisplayColumn
*
begin
,
const
WaveDisplayColumn
*
end
)
20
{
21
ownColums
.insert(
ownColums
.end(),
begin
,
end
);
22
columns
=
ownColums
.data();
23
}
24
25
void
WaveformDisplay::Allocate
()
26
{
27
ownColums
.reserve(
width
);
28
29
if
(
width
> 0)
30
columns
=
ownColums
.data();
31
}
32
33
WaveformDisplay::~WaveformDisplay
() =
default
;
WaveData.h
WaveformDisplay::WaveformDisplay
WaveformDisplay(int w)
Definition:
WaveData.cpp:13
WaveformDisplay::columns
WaveDisplayColumn * columns
Definition:
WaveData.h:32
WaveformDisplay::ownColums
std::vector< WaveDisplayColumn > ownColums
Definition:
WaveData.h:39
WaveformDisplay::~WaveformDisplay
~WaveformDisplay()
WaveformDisplay::AppendColumns
void AppendColumns(const WaveDisplayColumn *begin, const WaveDisplayColumn *end)
Definition:
WaveData.cpp:18
WaveformDisplay::width
int width
Definition:
WaveData.h:30
WaveformDisplay::Allocate
void Allocate()
Definition:
WaveData.cpp:25
details::end
const char * end(const char *str) noexcept
Definition:
StringUtils.h:106
details::begin
const char * begin(const char *str) noexcept
Definition:
StringUtils.h:101
WaveDisplayColumn
Data for sample blocks related to the column.
Definition:
WaveData.h:19
Generated by
1.9.3