Skip to content

Commit

Permalink
Renames Bypass to Apply
Browse files Browse the repository at this point in the history
  • Loading branch information
azeno committed Oct 31, 2024
1 parent 6aa80cb commit 55e935e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/EffectHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ internal partial class EffectHost : FactoryBasedVLNode, IVLNode, IComponentHandl
private readonly Pin<IObservable<IMidiMessage>> midiInputPin;
private readonly Pin<string> channelPrefixPin;
private readonly Pin<bool> showUiPin;
private readonly Pin<bool> byPassPin;
private readonly Pin<bool> applyPin;

private PluginState? state;
private IObservable<IMidiMessage>? midiInput;
private string? channelPrefix;
private bool showUI;
private bool byPass;
private bool apply;

private readonly ParameterInfo? byPassParameter;

Expand Down Expand Up @@ -158,7 +158,7 @@ public EffectHost(NodeContext nodeContext, IVLNodeDescription nodeDescription, s
Inputs[i++] = new ParametersInput(this);
Inputs[i++] = channelPrefixPin = new Pin<string>();
Inputs[i++] = showUiPin = new Pin<bool>();
Inputs[i++] = byPassPin = new Pin<bool>();
Inputs[i++] = applyPin = new Pin<bool>();

Outputs[o++] = new AudioOut(outputSignal);

Expand Down Expand Up @@ -258,10 +258,10 @@ public void Update()
HideEditor();
}

if (Acknowledge(ref byPass, byPassPin.Value))
if (Acknowledge(ref apply, applyPin.Value))
{
if (byPassParameter.HasValue)
SetParameter(byPassParameter.Value.ID, byPass ? 1.0 : 0.0);
SetParameter(byPassParameter.Value.ID, !apply ? 1.0 : 0.0);
}

// Move upcoming changes to audio thread and notify UI
Expand Down Expand Up @@ -610,7 +610,7 @@ unsafe void Process(AudioBufferStereo audioBufferStereo)
}

// Copy input to output if bypass is enabled and plugin doesn't handle it
if (byPass && byPassParameter is null)
if (!apply && byPassParameter is null)
{
leftInput.CopyTo(leftOutput);
rightInput.CopyTo(rightOutput);
Expand Down
2 changes: 1 addition & 1 deletion src/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ IVLNodeDescription GetNodeDescription(IVLNodeDescriptionFactory nodeDescriptionF
ctx.Pin("Parameters", typeof(IReadOnlyDictionary<string, float>)),
ctx.Pin("Channel Prefix", typeof(string), null),
ctx.Pin("Show Editor", typeof(bool)),
ctx.Pin("Bypass", typeof(bool))
ctx.Pin("Apply", typeof(bool), defaultValue: true)
};
var outputs = new List<IVLPinDescription>()
{
Expand Down

0 comments on commit 55e935e

Please sign in to comment.