Audacity
3.2.0
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
w
z
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
h
i
k
l
m
o
p
r
s
t
x
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
y
Related Functions
a
b
c
d
e
f
g
l
m
n
o
p
r
s
t
v
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
c
d
e
f
k
l
m
n
o
p
r
s
t
u
v
z
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
libraries
lib-dynamic-range-processor
DynamicRangeProcessorHistory.h
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
DynamicRangeProcessorHistory.h
7
8
Matthieu Hodgkinson
9
10
**********************************************************************/
11
#pragma once
12
13
#include "
DynamicRangeProcessorTypes.h
"
14
#include <memory>
15
#include <optional>
16
#include <vector>
17
18
class
DYNAMIC_RANGE_PROCESSOR_API
DynamicRangeProcessorHistory
final
19
{
20
public
:
21
DynamicRangeProcessorHistory
(
double
sampleRate
);
22
23
struct
Packet
24
{
25
float
time = 0.f;
26
float
target = 0.f;
27
float
follower = 0.f;
28
float
input = 0.f;
29
float
output = 0.f;
30
};
31
32
static
constexpr
auto
maxTimeSeconds = 2.5f;
33
34
using
Segment
= std::vector<Packet>;
35
36
void
Push(
const
std::vector<DynamicRangeProcessorOutputPacket>& packets);
37
void
BeginNewSegment();
38
const
std::vector<Segment>& GetSegments()
const
;
39
bool
IsEmpty()
const
;
40
41
private
:
42
float
GetPacketTime(
const
DynamicRangeProcessorOutputPacket
& packet)
const
;
43
44
const
double
mSampleRate
;
45
bool
mBeginNewSegment =
true
;
46
std::vector<Segment>
mSegments
;
47
std::optional<long long>
mFirstPacketFirstSampleIndex
;
48
std::optional<long long>
mExpectedNextPacketFirstSampleIndex
;
49
};
50
51
class
DynamicRangeProcessorHistory
;
DynamicRangeProcessorTypes.h
DynamicRangeProcessorHistory
Definition:
DynamicRangeProcessorHistory.h:19
DynamicRangeProcessorHistory::mSegments
std::vector< Segment > mSegments
Definition:
DynamicRangeProcessorHistory.h:46
DynamicRangeProcessorHistory::mSampleRate
const double mSampleRate
Definition:
DynamicRangeProcessorHistory.h:44
DynamicRangeProcessorHistory::mFirstPacketFirstSampleIndex
std::optional< long long > mFirstPacketFirstSampleIndex
Definition:
DynamicRangeProcessorHistory.h:47
DynamicRangeProcessorHistory::Segment
std::vector< Packet > Segment
Definition:
DynamicRangeProcessorHistory.h:34
DynamicRangeProcessorHistory::mExpectedNextPacketFirstSampleIndex
std::optional< long long > mExpectedNextPacketFirstSampleIndex
Definition:
DynamicRangeProcessorHistory.h:48
anonymous_namespace{ClipSegmentTest.cpp}::sampleRate
constexpr auto sampleRate
Definition:
ClipSegmentTest.cpp:20
DynamicRangeProcessorHistory::Packet
Definition:
DynamicRangeProcessorHistory.h:24
DynamicRangeProcessorOutputPacket
Definition:
DynamicRangeProcessorTypes.h:20
Generated by
1.9.3