From 4450f13a8e748cc6055efe1c2994a571d49df245 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sat, 2 Jul 2022 04:31:22 -0700 Subject: [PATCH] [Plugin Loader] Unregister loader callback This callback should be unregistered when plugin loading completes, otherwise we could end up processing bundles loaded by external stuff, like Audio Units loading for MIDI playback. Signed-off-by: Christopher Snowhill --- Audio/PluginController.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Audio/PluginController.mm b/Audio/PluginController.mm index 99909f078..cc5f6c94e 100644 --- a/Audio/PluginController.mm +++ b/Audio/PluginController.mm @@ -196,6 +196,9 @@ static PluginController *sharedPluginController = nil; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(bundleDidLoad:) name:NSBundleDidLoadNotification object:nil]; [self loadPlugins]; + + [[NSNotificationCenter defaultCenter] removeObserver:self name:NSBundleDidLoadNotification object:nil]; + [self printPluginInfo]; } }