Audacity
3.2.0
libraries
lib-dynamic-range-processor
MeterValueProvider.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
MeterValueProvider.cpp
7
8
Matthieu Hodgkinson
9
10
**********************************************************************/
11
#include "
MeterValueProvider.h
"
12
#include "
DownwardMeterValueProvider.h
"
13
#include "
UpwardMeterValueProvider.h
"
14
15
#include <cassert>
16
17
std::unique_ptr<MeterValueProvider>
18
MeterValueProvider::Create
(
Direction
direction)
19
{
20
switch
(direction)
21
{
22
case
Direction::Upwards
:
23
return
std::make_unique<UpwardMeterValueProvider>();
24
case
Direction::Downwards
:
25
return
std::make_unique<DownwardMeterValueProvider>();
26
default
:
27
assert(
false
);
28
return
nullptr
;
29
}
30
}
DownwardMeterValueProvider.h
MeterValueProvider.h
UpwardMeterValueProvider.h
MeterValueProvider::Create
static std::unique_ptr< MeterValueProvider > Create(Direction direction)
Definition:
MeterValueProvider.cpp:18
MeterValueProvider::Direction
Direction
Definition:
MeterValueProvider.h:19
MeterValueProvider::Direction::Downwards
@ Downwards
MeterValueProvider::Direction::Upwards
@ Upwards
Generated by
1.9.3