add sampo's synthesize_sources perl script to tools; add scroll-playhead-{forward...
[ardour.git] / gtk2_ardour / au_pluginui.cc
index 3e0e7e4874c528466ff7f327a270157d4d0c3ed7..ce8771bc9499a00ef838adfe870ec1fc6007bf5e 100644 (file)
 
 */
 
-#include <ardour/insert.h>
 #include <ardour/audio_unit.h>
+#include <ardour/insert.h>
+
+#include <gtkmm2ext/doi.h>
+
+#include "au_pluginui.h"
+#include "gui_thread.h"
 
-#include "plugin_ui.h"
+#include <appleutility/CAAudioUnit.h>
+#include <appleutility/CAComponent.h>
+
+#include <AudioUnit/AudioUnit.h>
+
+#include "i18n.h"
 
 using namespace ARDOUR;
 using namespace PBD;
 
-AUPluginUI::AUPluginUI (ARDOUR::AudioEngine& engine, boost::shared_ptr<PluginInsert> ap)
+AUPluginUI::AUPluginUI (boost::shared_ptr<PluginInsert> insert)
 {
+       if ((au = boost::dynamic_pointer_cast<AUPlugin> (insert->plugin())) == 0) {
+               error << _("unknown type of editor-supplying plugin (note: no AudioUnit support in this version of ardour)") << endmsg;
+               throw failed_constructor ();
+       }
+
        info << "AUPluginUI created" << endmsg;
 }
 
@@ -35,3 +50,4 @@ AUPluginUI::~AUPluginUI ()
 {
        // nothing to do here - plugin destructor destroys the GUI
 }
+