Fixed compilation of CoreAudioSource
[ardour.git] / gtk2_ardour / au_pluginui.cc
1 /*
2     Copyright (C) 2006 Paul Davis 
3         Written by Taybin Rutkin
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 */
20
21 #include <ardour/audio_unit.h>
22 #include <ardour/insert.h>
23
24 #include <gtkmm2ext/doi.h>
25
26 #include "au_pluginui.h"
27 #include "gui_thread.h"
28
29 #include <appleutility/CAAudioUnit.h>
30 #include <appleutility/CAComponent.h>
31
32 #include <AudioUnit/AudioUnit.h>
33
34 #include "i18n.h"
35
36 using namespace ARDOUR;
37 using namespace PBD;
38
39 AUPluginUI::AUPluginUI (boost::shared_ptr<PluginInsert> insert)
40 {
41         if ((au = boost::dynamic_pointer_cast<AUPlugin> (insert->plugin())) == 0) {
42                 error << _("unknown type of editor-supplying plugin (note: no AudioUnit support in this version of ardour)") << endmsg;
43                 throw failed_constructor ();
44         }
45
46         info << "AUPluginUI created" << endmsg;
47 }
48
49 AUPluginUI::~AUPluginUI ()
50 {
51         // nothing to do here - plugin destructor destroys the GUI
52 }
53