|
|
|
@@ -478,8 +478,8 @@ public: |
|
|
|
|
|
|
|
resetBusses();
|
|
|
|
|
|
|
|
prepared = (AudioUnitInitialize (audioUnit) == noErr);
|
|
|
|
jassert (prepared);
|
|
|
|
jassert (! prepared);
|
|
|
|
initialiseAudioUnit();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -499,6 +499,14 @@ public: |
|
|
|
incomingMidi.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool initialiseAudioUnit()
|
|
|
|
{
|
|
|
|
if (! prepared)
|
|
|
|
prepared = (AudioUnitInitialize (audioUnit) == noErr);
|
|
|
|
|
|
|
|
return prepared;
|
|
|
|
}
|
|
|
|
|
|
|
|
void resetBusses()
|
|
|
|
{
|
|
|
|
for (int i = 0; i < numInputBusses; ++i) AudioUnitReset (audioUnit, kAudioUnitScope_Input, i);
|
|
|
|
@@ -1351,12 +1359,13 @@ private: |
|
|
|
|
|
|
|
bool createView (const bool createGenericViewIfNeeded)
|
|
|
|
{
|
|
|
|
if (! plugin.initialiseAudioUnit())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
NSView* pluginView = nil;
|
|
|
|
UInt32 dataSize = 0;
|
|
|
|
Boolean isWritable = false;
|
|
|
|
|
|
|
|
AudioUnitInitialize (plugin.audioUnit);
|
|
|
|
|
|
|
|
if (AudioUnitGetPropertyInfo (plugin.audioUnit, kAudioUnitProperty_CocoaUI, kAudioUnitScope_Global,
|
|
|
|
0, &dataSize, &isWritable) == noErr
|
|
|
|
&& dataSize != 0
|
|
|
|
@@ -1523,16 +1532,10 @@ private: |
|
|
|
|
|
|
|
Float32Point pos = { 0, 0 };
|
|
|
|
Float32Point size = { 250, 200 };
|
|
|
|
|
|
|
|
HIViewRef pluginView = 0;
|
|
|
|
|
|
|
|
AudioUnitCarbonViewCreate (carbonView,
|
|
|
|
owner.getAudioUnit(),
|
|
|
|
windowRef,
|
|
|
|
rootView,
|
|
|
|
&pos,
|
|
|
|
&size,
|
|
|
|
(ControlRef*) &pluginView);
|
|
|
|
AudioUnitCarbonViewCreate (carbonView, owner.getAudioUnit(), windowRef, rootView,
|
|
|
|
&pos, &size, (ControlRef*) &pluginView);
|
|
|
|
|
|
|
|
return pluginView;
|
|
|
|
}
|
|
|
|
|