diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-09-02 10:30:02 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-09-02 10:30:02 +0200 |
commit | e37c5f5048bb440140dc56ce773d105fc2129385 (patch) | |
tree | 0dfe0ab9faec524fd1ee085c6cf763aa15484331 /src/powerlist.cc | |
parent | 6a96bcf1659d07cd3a7f7e65519007abfaeda2a0 (diff) |
Implement master bleed control in the instrument parser and engine.
Diffstat (limited to 'src/powerlist.cc')
-rw-r--r-- | src/powerlist.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/powerlist.cc b/src/powerlist.cc index b502d03..b5e7c84 100644 --- a/src/powerlist.cc +++ b/src/powerlist.cc @@ -67,19 +67,19 @@ void PowerList::add(Sample* sample) samples.push_back(item); } -Channel* PowerList::getMasterChannel() +const Channel* PowerList::getMasterChannel() { - std::map<Channel*, int> count; + std::map<const Channel*, int> count; for (auto& item: samples) { Sample* sample{item.sample}; - Channel* max_channel{nullptr}; + const Channel* max_channel{nullptr}; sample_t max_val{0}; for (auto& pair: sample->audiofiles) { - Channel* c = pair.first; + const Channel* c = pair.first; AudioFile* af = pair.second; af->load(LOAD_SIZE); @@ -116,7 +116,7 @@ Channel* PowerList::getMasterChannel() } } - Channel* master{nullptr}; + const Channel* master{nullptr}; int max_count{-1}; for (auto& pair: count) @@ -134,7 +134,7 @@ Channel* PowerList::getMasterChannel() void PowerList::finalise() { #ifdef AUTO_CALCULATE_POWER - Channel* master_channel = getMasterChannel(); + const Channel* master_channel = getMasterChannel(); if(master_channel == nullptr) { |