Skip to content

Commit

Permalink
Set value of parameters in correct order, increment version number, a…
Browse files Browse the repository at this point in the history
…nd clip input volume
  • Loading branch information
jameshball committed Jan 1, 2024
1 parent b20ef8b commit 18776c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ void OscirenderAudioProcessor::processBlock(juce::AudioBuffer<float>& buffer, ju
volumeBuffer[volumeBufferIndex] = (left * left + right * right) / 2;
squaredVolume += volumeBuffer[volumeBufferIndex] / volumeBuffer.size();
currentVolume = std::sqrt(squaredVolume);
currentVolume = juce::jlimit(0.0, 1.0, currentVolume);

Vector2 channels;
if (totalNumOutputChannels >= 2) {
Expand Down
12 changes: 6 additions & 6 deletions Source/audio/EffectParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ class FloatParameter : public juce::AudioProcessorParameterWithID {

// opt to not change any values if not found
void load(juce::XmlElement* xml) {
if (xml->hasAttribute("value")) {
setUnnormalisedValueNotifyingHost(xml->getDoubleAttribute("value"));
}
if (xml->hasAttribute("min")) {
min = xml->getDoubleAttribute("min");
}
Expand All @@ -123,6 +120,9 @@ class FloatParameter : public juce::AudioProcessorParameterWithID {
if (xml->hasAttribute("step")) {
step = xml->getDoubleAttribute("step");
}
if (xml->hasAttribute("value")) {
setUnnormalisedValueNotifyingHost(xml->getDoubleAttribute("value"));
}
}

private:
Expand Down Expand Up @@ -237,15 +237,15 @@ class IntParameter : public juce::AudioProcessorParameterWithID {

// opt to not change any values if not found
void load(juce::XmlElement* xml) {
if (xml->hasAttribute("value")) {
setUnnormalisedValueNotifyingHost(xml->getIntAttribute("value"));
}
if (xml->hasAttribute("min")) {
min = xml->getIntAttribute("min");
}
if (xml->hasAttribute("max")) {
max = xml->getIntAttribute("max");
}
if (xml->hasAttribute("value")) {
setUnnormalisedValueNotifyingHost(xml->getIntAttribute("value"));
}
}

private:
Expand Down
2 changes: 1 addition & 1 deletion osci-render.jucer
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
pluginCharacteristicsValue="pluginProducesMidiOut,pluginWantsMidiIn"
pluginManufacturer="jameshball" aaxIdentifier="sh.ball.oscirender"
cppLanguageStandard="20" projectLineFeed="&#10;" headerPath="./include"
version="2.0.4" companyName="James H Ball" companyWebsite="https://osci-render.com"
version="2.0.5" companyName="James H Ball" companyWebsite="https://osci-render.com"
companyEmail="[email protected]">
<MAINGROUP id="j5Ge2T" name="osci-render">
<GROUP id="{5ABCED88-0059-A7AF-9596-DBF91DDB0292}" name="Resources">
Expand Down

0 comments on commit 18776c7

Please sign in to comment.