summaryrefslogtreecommitdiff
path: root/src/powerlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/powerlist.h')
-rw-r--r--src/powerlist.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/powerlist.h b/src/powerlist.h
index b3b47e4..000da15 100644
--- a/src/powerlist.h
+++ b/src/powerlist.h
@@ -30,38 +30,30 @@
#include "sample.h"
-class Random;
-struct Settings;
+struct PowerListItem
+{
+ Sample* sample;
+ float power;
+};
+using PowerListItems = std::vector<PowerListItem>;
class PowerList
{
public:
- PowerList(Random& rand, Settings& settings);
+ PowerList();
void add(Sample* s);
void finalise(); ///< Call this when no more samples will be added.
- Sample* get(level_t velocity, std::size_t pos);
+ const PowerListItems& getPowerListItems() const;
float getMaxPower() const;
float getMinPower() const;
private:
- struct PowerListItem
- {
- Sample* sample;
- float power;
- };
-
- Random& rand;
- Settings& settings;
-
- std::vector<PowerListItem> samples;
+ PowerListItems samples;
float power_max;
float power_min;
const Channel* getMasterChannel();
- Sample* lastsample;
-
- std::vector<std::size_t> last;
};