one less deprecated API
authorRobin Gareus <robin@gareus.org>
Sun, 18 Oct 2015 21:29:58 +0000 (23:29 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 18 Oct 2015 21:29:58 +0000 (23:29 +0200)
gtk2_ardour/au_pluginui.mm

index 27949b10856e7ea6f7f7f2efc1637da033061493..dbfbe115261ff9ea26110c38fb90f6ba4f327683 100644 (file)
 #include "public_editor.h"
 #include "i18n.h"
 
+#ifdef COREAUDIO105
+#define ArdourCloseComponent CloseComponent
+#else
+#define ArdourCloseComponent AudioComponentInstanceDispose
+#endif
 using namespace ARDOUR;
 using namespace Gtk;
 using namespace Gtkmm2ext;
@@ -261,7 +266,7 @@ AUPluginUI::~AUPluginUI ()
 #endif
 
        if (editView) {
-               CloseComponent (editView);
+               ArdourCloseComponent (editView);
        }
 
        if (au_view) {
@@ -502,14 +507,14 @@ AUPluginUI::create_carbon_view ()
 
        if ((err = CreateNewWindow(kUtilityWindowClass, attr, &r, &carbon_window)) != noErr) {
                error << string_compose (_("AUPluginUI: cannot create carbon window (err: %1)"), err) << endmsg;
-               CloseComponent (editView);
+               ArdourCloseComponent (editView);
                return -1;
        }
 
        if ((err = GetRootControl(carbon_window, &root_control)) != noErr) {
                error << string_compose (_("AUPlugin: cannot get root control of carbon window (err: %1)"), err) << endmsg;
                DisposeWindow (carbon_window);
-               CloseComponent (editView);
+               ArdourCloseComponent (editView);
                return -1;
        }
 
@@ -520,7 +525,7 @@ AUPluginUI::create_carbon_view ()
        if ((err = AudioUnitCarbonViewCreate (editView, *au->get_au(), carbon_window, root_control, &location, &size, &viewPane)) != noErr) {
                error << string_compose (_("AUPluginUI: cannot create carbon plugin view (err: %1)"), err) << endmsg;
                DisposeWindow (carbon_window);
-               CloseComponent (editView);
+               ArdourCloseComponent (editView);
                return -1;
        }