blob: ffbd6baf23b02d63698a16c7f62125298697a272 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
#pragma once
#include <vector>
#include "sample.h"
struct PowerListItem
{
Sample* sample;
float power;
bool operator<(const PowerListItem& other) const
{
return power < other.power;
}
bool operator<(level_t power) const
{
return this->power < power;
}
};
using PowerListItems = std::vector<PowerListItem>;
class PowerList
{
public:
PowerList();
void add(Sample* s);
void finalise();
const PowerListItems& getPowerListItems() const;
float getMaxPower() const;
float getMinPower() const;
private:
PowerListItems samples;
float power_max;
float power_min;
const Channel* getMasterChannel();
};
|