[AUv3] Custom editor creates a second processor instead of using the audio processor instance
Summary
The AUv3 view controller creates a new plugin processor for the custom editor instead of using the processor owned by the audio unit's render path.
This creates two independent processor instances:
Custom editor -> Processor A
Audio render -> Processor B
The UI can therefore modify state that is unrelated to the processor producing audio.
Severity
P0 — Blocking for custom AUv3 editors
Affected area
modules/yup_audio_plugin_client/auv3/yup_audio_plugin_client_AUv3.mm
Current behaviour
The view controller creates its own processor:
processor.reset(::createPluginProcessor());
The editor is then created from that processor:
editor = processor->createEditor();
The AUv3 audio wrapper also creates a processor for audio rendering.
Impact
This can cause:
- UI controls that do not affect the rendered audio;
- processor state shown by the editor to differ from host state;
- presets loaded in the editor to affect only the UI-owned processor;
- visualizers and meters to display data from the wrong DSP instance;
- duplicated DSP resources and unnecessary memory usage;
- inconsistent parameter automation and restoration.
Steps to reproduce
- Build an AUv3 plugin with a custom YUP editor.
- Load it in an AUv3 host.
- Change a parameter through a custom control that writes directly to the processor or its parameter model.
- Compare the editor processor address with the render processor address.
- Listen for the expected DSP change.
Actual result
The editor may control a separately created processor rather than the processor used for audio rendering.
Expected result
The custom editor must use the exact processor instance owned by the AUv3 audio unit.
Only one plugin processor should exist per audio-unit instance.
Suggested fix
The view controller should retrieve a non-owning reference to the processor through the instantiated audio unit:
void AudioPluginViewController::attachToAudioUnit(YUPAudioUnit* audioUnit)
{
auto* wrapper = YUPAudioUnit::getThis(audioUnit);
processor = wrapper != nullptr ? wrapper->getProcessor() : nullptr;
}
Ownership should remain with the audio wrapper.
The editor should then be created from that processor:
editor = processor != nullptr ? processor->createEditor() : nullptr;
The view controller must not call createPluginProcessor().
Acceptance criteria
[AUv3] Custom editor creates a second processor instead of using the audio processor instance
Summary
The AUv3 view controller creates a new plugin processor for the custom editor instead of using the processor owned by the audio unit's render path.
This creates two independent processor instances:
The UI can therefore modify state that is unrelated to the processor producing audio.
Severity
P0 — Blocking for custom AUv3 editors
Affected area
modules/yup_audio_plugin_client/auv3/yup_audio_plugin_client_AUv3.mmCurrent behaviour
The view controller creates its own processor:
The editor is then created from that processor:
editor = processor->createEditor();The AUv3 audio wrapper also creates a processor for audio rendering.
Impact
This can cause:
Steps to reproduce
Actual result
The editor may control a separately created processor rather than the processor used for audio rendering.
Expected result
The custom editor must use the exact processor instance owned by the AUv3 audio unit.
Only one plugin processor should exist per audio-unit instance.
Suggested fix
The view controller should retrieve a non-owning reference to the processor through the instantiated audio unit:
Ownership should remain with the audio wrapper.
The editor should then be created from that processor:
The view controller must not call
createPluginProcessor().Acceptance criteria