From e37c5f5048bb440140dc56ce773d105fc2129385 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 2 Sep 2017 10:30:02 +0200 Subject: Implement master bleed control in the instrument parser and engine. --- src/powerlist.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/powerlist.cc') 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 count; + std::map 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) { -- cgit v1.2.3