summaryrefslogtreecommitdiff
path: root/distrho/src/CocoaUI/PluginAU_CocoaUI.m
diff options
context:
space:
mode:
Diffstat (limited to 'distrho/src/CocoaUI/PluginAU_CocoaUI.m')
-rw-r--r--distrho/src/CocoaUI/PluginAU_CocoaUI.m18
1 files changed, 8 insertions, 10 deletions
diff --git a/distrho/src/CocoaUI/PluginAU_CocoaUI.m b/distrho/src/CocoaUI/PluginAU_CocoaUI.m
index dec13f50..44fb79fa 100644
--- a/distrho/src/CocoaUI/PluginAU_CocoaUI.m
+++ b/distrho/src/CocoaUI/PluginAU_CocoaUI.m
@@ -3,7 +3,6 @@
#include <AudioToolbox/AudioToolbox.h>
#include <AudioUnit/AUCocoaUIView.h>
#include "DistrhoUIInternal.hpp"
-#include "DistrhoPluginInternal.hpp" // Direct access
#define MAX_PARAMS 100
@@ -14,7 +13,6 @@ class UIAu
public:
UIAu(const char* const uiTitle)
: fUI(this, 0, nullptr, setParameterCallback, setStateCallback, sendNoteCallback, setSizeCallback),
- fPlugin((PluginExporter *)fUI.getDirectAccess()),
fHostClosed(false)
{
fUI.setWindowTitle(uiTitle);
@@ -24,11 +22,6 @@ public:
{
}
- uint32_t getParameterCountFromDSP()
- {
- return fPlugin->getParameterCount();
- }
-
void auui_showhide(bool show)
{
fUI.setWindowVisible(show);
@@ -55,7 +48,6 @@ protected:
private:
UIExporter fUI;
- PluginExporter *fPlugin;
bool fHostClosed;
// -------------------------------------------------------------------
@@ -130,8 +122,14 @@ END_NAMESPACE_DISTRHO
if (mAU) [self _removeListeners];
mAU = inAU;
fUIAu = new UIAu(DISTRHO_PLUGIN_NAME);
-
- paramCount = fUIAu->getParameterCountFromDSP();
+ void *data = NULL;
+
+ AudioUnitGetProperty (inAU,
+ kAudioUnitProperty_ParameterList,
+ kAudioUnitScope_Global,
+ 0,
+ data,
+ &paramCount);
UInt32 i;
for (i = 0; i < paramCount; ++i) {