Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DBraun committed Feb 20, 2023
1 parent de21472 commit 4419dfd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Source/AddProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ class AddProcessor : public ProcessorBase {
// and the size of myGainLevels isn't zero. If it were zero,
// getSafeGainLevel(index) will know to use 1.0f for every gain.

// todo: throw graceful error
return;
throw std::runtime_error(
"AddProcessor: The incoming audio buffer has " + numInputs +
std::string(
" channels, but the number of specified gain levels is ") +
std::to_string(myGainLevels.size()));
}

const int numTimesToSum = numInputs - 1;
Expand Down
2 changes: 1 addition & 1 deletion Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ const PluginPatch PluginProcessor::getPatch() {
for (auto& uncastedParameter : this->getParameters()) {
auto parameter = (AutomateParameterFloat*)uncastedParameter;
float val = parameter->sample(posInfo);
params.push_back(std::make_pair(i, val));
params.emplace_back(i, val);
i++;
}

Expand Down
5 changes: 4 additions & 1 deletion Source/RenderEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,10 @@ void RenderEngine::transportRewind() {}
void RenderEngine::prepareProcessor(ProcessorBase* processor,
const std::string& name) {
if (this->removeProcessor(name)) {
// todo: maybe warn the user that a processor was removed.
std::cerr << "Warning: a processor with the name \"" << name
<< "\" already exists and was removed to make room for the new "
"processor."
<< std::endl;
};

auto node = m_mainProcessorGraph->addNode(
Expand Down

0 comments on commit 4419dfd

Please sign in to comment.