summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorTaybin Rutkin <taybin@taybin.com>2006-08-31 16:34:42 +0000
committerTaybin Rutkin <taybin@taybin.com>2006-08-31 16:34:42 +0000
commit9bc22f6f86deb4258faf298b45cb117f09af8f96 (patch)
tree5318d027df86289bf8c1bcdea7b31685054a92a4 /gtk2_ardour
parent21d85f1854461ab6209d23e278fe289505cd106c (diff)
Fixed compilation of CoreAudioSource
Seperated AUDIOUNITS support from COREAUDIO support. Fixed metadata saving in SfdbUI. git-svn-id: svn://localhost/ardour2/trunk@879 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/SConscript8
-rw-r--r--gtk2_ardour/au_pluginui.cc106
-rw-r--r--gtk2_ardour/au_pluginui.h4
-rw-r--r--gtk2_ardour/plugin_selector.cc18
-rw-r--r--gtk2_ardour/plugin_selector.h4
-rw-r--r--gtk2_ardour/redirect_box.cc4
-rw-r--r--gtk2_ardour/sfdb_ui.cc6
7 files changed, 22 insertions, 128 deletions
diff --git a/gtk2_ardour/SConscript b/gtk2_ardour/SConscript
index ca40cbfcb9..c1eba1ea1d 100644
--- a/gtk2_ardour/SConscript
+++ b/gtk2_ardour/SConscript
@@ -61,7 +61,7 @@ skipped_files=Split("""
connection_editor.cc
""")
-coreaudio_files=Split("""
+audiounit_files=Split("""
au_pluginui.cc
""")
@@ -221,9 +221,9 @@ if env['VST']:
extra_sources += vst_files
gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
-if gtkardour['COREAUDIO']:
- extra_sources += coreaudio_files
- gtkardour.Append(CCFLAGS='-DHAVE_COREAUDIO')
+if gtkardour['AUDIOUNITS']:
+ extra_sources += audiounit_files
+ gtkardour.Append(CCFLAGS='-DHAVE_AUDIOUNITS')
gtkardour.Append(LINKFLAGS='-framework Carbon')
gtkardour.Merge([libraries['appleutility']])
diff --git a/gtk2_ardour/au_pluginui.cc b/gtk2_ardour/au_pluginui.cc
index 092e34d50b..ce8771bc94 100644
--- a/gtk2_ardour/au_pluginui.cc
+++ b/gtk2_ardour/au_pluginui.cc
@@ -43,77 +43,6 @@ AUPluginUI::AUPluginUI (boost::shared_ptr<PluginInsert> insert)
throw failed_constructor ();
}
- OSStatus err = noErr;
-
- CAComponentDescription desc;
- Component carbonViewComponent = NULL;
- AudioUnitCarbonView carbonView = NULL;
-
- GetComponentInfo(au->get_comp()->Comp(), &desc, 0, 0, 0);
- carbonViewComponent = get_carbon_view_component(desc.componentSubType);
- err = OpenAComponent(carbonViewComponent, &carbonView);
-
- Rect rec;
- rec.top = 0;
- rec.left = 0;
- rec.bottom = 400;
- rec.right = 500;
-
- ProcessSerialNumber ourPSN;
-
- /* Here we will set the MacOSX native section of the process to the foreground for putting up this
- * dialog box. First step is to get our process serial number. We do this by calling
- * GetCurrentProcess.
- * First Argument: On success this PSN will be our PSN on return.
- * Return Value: A Macintosh error indicating success or failure.
- */
- err = GetCurrentProcess(&ourPSN);
-
- //If no error then set this process to be frontmost.
- if (err == noErr) {
- /* Calling SetFrontProcess to make us frontmost.
- * First Argument: The Process Serial Number of the process we want to make frontmost. Here
- * of course we pass our process serial number
- * Return Value: An error value indicating success or failure. We just ignore the return
- * value here.
- */
- (void)SetFrontProcess(&ourPSN);
- } else {
- error << "couldn't get current process" << endmsg;
- }
-
- err = CreateNewWindow (kDocumentWindowClass, kWindowStandardFloatingAttributes, &rec, &wr);
-
- ComponentResult auResult;
- ControlRef rootControl = NULL;
- GetRootControl(wr, &rootControl);
-
- int width = 500;
- int height = 400;
- Float32Point location = {30, 30};
- Float32Point size = {width, height};
- ControlRef audioUnitControl = NULL;
-
- auResult = AudioUnitCarbonViewCreate(carbonView,
- au->get_au()->AU(),
- wr,
- rootControl,
- &location,
- &size,
- &audioUnitControl);
-
- ShowWindow (wr);
- BringToFront (wr);
-// AudioUnitCarbonViewSetEventListener(carbonView, EventListener, this);
-#if 0
- set_name ("PluginEditor");
- add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
-
- signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window*> (this)));
-#endif
-
- insert->GoingAway.connect (mem_fun(*this, &AUPluginUI::plugin_going_away));
-
info << "AUPluginUI created" << endmsg;
}
@@ -122,38 +51,3 @@ AUPluginUI::~AUPluginUI ()
// nothing to do here - plugin destructor destroys the GUI
}
-void
-AUPluginUI::plugin_going_away (ARDOUR::Redirect* ignored)
-{
- ENSURE_GUI_THREAD(bind (mem_fun(*this, &AUPluginUI::plugin_going_away), ignored));
-
- delete_when_idle (this);
-}
-
-Component
-AUPluginUI::get_carbon_view_component(OSType subtype)
-{
- ComponentDescription desc;
- Component component;
-
- desc.componentType = kAudioUnitCarbonViewComponentType; // 'auvw'
- desc.componentSubType = subtype;
- desc.componentManufacturer = 0;
- desc.componentFlags = 0;
- desc.componentFlagsMask = 0;
-
- // First see if we can find a carbon view designed specifically for this
- // plug-in:
-
- component = FindNextComponent(NULL, &desc);
- if (component)
- return component;
-
- // If not, grab the generic carbon view, which will create a GUI for
- // any Audio Unit.
-
- desc.componentSubType = kAUCarbonViewSubType_Generic;
- component = FindNextComponent(NULL, &desc);
-
- return component;
-}
diff --git a/gtk2_ardour/au_pluginui.h b/gtk2_ardour/au_pluginui.h
index 2dcefcc42f..f52605217a 100644
--- a/gtk2_ardour/au_pluginui.h
+++ b/gtk2_ardour/au_pluginui.h
@@ -38,11 +38,7 @@ class AUPluginUI
~AUPluginUI ();
private:
- WindowRef wr;
boost::shared_ptr<ARDOUR::AUPlugin> au;
-
- void plugin_going_away (ARDOUR::Redirect*);
- Component get_carbon_view_component(OSType subtype);
};
#endif // __au_plugin_ui_h__
diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc
index 69f6f56690..8a52e8587f 100644
--- a/gtk2_ardour/plugin_selector.cc
+++ b/gtk2_ardour/plugin_selector.cc
@@ -92,7 +92,7 @@ PluginSelector::PluginSelector (PluginManager *mgr)
}
#endif
-#ifdef HAVE_COREAUDIO
+#ifdef HAVE_AUDIOUNIT
aumodel = ListStore::create(aucols);
au_display.set_model (aumodel);
au_display.append_column (_("Available plugins"), aucols.name);
@@ -151,7 +151,7 @@ PluginSelector::PluginSelector (PluginManager *mgr)
}
#endif
-#ifdef HAVE_COREAUDIO
+#ifdef HAVE_AUDIOUNIT
notebook.pages().push_back (TabElem (auscroller, _("AudioUnit")));
#endif
@@ -171,7 +171,7 @@ PluginSelector::PluginSelector (PluginManager *mgr)
}
#endif
-#ifdef HAVE_COREAUDIO
+#ifdef HAVE_AUDIOUNIT
au_display.signal_button_press_event().connect_notify (mem_fun(*this, &PluginSelector::row_clicked));
au_display.get_selection()->signal_changed().connect (mem_fun(*this, &PluginSelector::au_display_selection_changed));
#endif
@@ -187,7 +187,7 @@ PluginSelector::PluginSelector (PluginManager *mgr)
vst_refiller ();
#endif
-#ifdef HAVE_COREAUDIO
+#ifdef HAVE_AUDIOUNIT
au_refiller ();
#endif
@@ -219,7 +219,7 @@ PluginSelector::set_correct_focus()
}
#endif
-#ifdef HAVE_COREAUDIO
+#ifdef HAVE_AUDIOUNIT
cp--;
if (cp == 0) {
@@ -330,7 +330,7 @@ PluginSelector::vst_display_selection_changed()
#endif //VST_SUPPORT
-#ifdef HAVE_COREAUDIO
+#ifdef HAVE_AUDIOUNIT
void
PluginSelector::_au_refiller (void *arg)
@@ -374,7 +374,7 @@ PluginSelector::au_display_selection_changed()
current_selection = ARDOUR::AudioUnit;
}
-#endif //HAVE_COREAUDIO
+#endif //HAVE_AUDIOUNIT
void
PluginSelector::use_plugin (PluginInfoPtr pi)
@@ -413,7 +413,7 @@ PluginSelector::btn_add_clicked()
#endif
break;
case ARDOUR::AudioUnit:
-#ifdef HAVE_COREAUDIO
+#ifdef HAVE_AUDIOUNIT
row = *(au_display.get_selection()->get_selected());
name = row[aucols.name];
pi = row[aucols.plugin];
@@ -451,7 +451,7 @@ PluginSelector::btn_update_clicked()
#ifdef VST_SUPPORT
vst_refiller ();
#endif
-#ifdef HAVE_COREAUDIO
+#ifdef HAVE_AUDIOUNIT
au_refiller ();
#endif
}
diff --git a/gtk2_ardour/plugin_selector.h b/gtk2_ardour/plugin_selector.h
index d71203131c..73c3008e64 100644
--- a/gtk2_ardour/plugin_selector.h
+++ b/gtk2_ardour/plugin_selector.h
@@ -110,7 +110,7 @@ class PluginSelector : public ArdourDialog
void vst_display_selection_changed();
#endif // VST_SUPPORT
-#ifdef HAVE_COREAUDIO
+#ifdef HAVE_AUDIOUNIT
// page 3
struct AUColumns : public Gtk::TreeModel::ColumnRecord {
AUColumns () {
@@ -131,7 +131,7 @@ class PluginSelector : public ArdourDialog
static void _au_refiller (void *);
void au_refiller ();
void au_display_selection_changed();
-#endif //HAVE_COREAUDIO
+#endif //HAVE_AUDIOUNIT
ARDOUR::PluginManager *manager;
diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc
index 058cc9f5ab..48562f1ffb 100644
--- a/gtk2_ardour/redirect_box.cc
+++ b/gtk2_ardour/redirect_box.cc
@@ -62,7 +62,7 @@
#include "i18n.h"
-#ifdef HAVE_COREAUDIO
+#ifdef HAVE_AUDIOUNIT
#include "au_pluginui.h"
#endif
@@ -1000,7 +1000,7 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
} else {
plugin_ui->show_all ();
}
-#ifdef HAVE_COREAUDIO
+#ifdef HAVE_AUDIOUNIT
} else if (type == ARDOUR::AudioUnit) {
AUPluginUI* plugin_ui;
if (plugin_insert->get_gui() == 0) {
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index cfede6d863..0f167776b0 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -269,7 +269,11 @@ SoundFileBox::remove_field_clicked ()
void
SoundFileBox::field_edited (const Glib::ustring& str1, const Glib::ustring& str2)
{
- cout << "field_edited" << endl;
+ Gtk::TreeModel::Children rows(fields->children());
+ Gtk::TreeModel::Row row(rows[atoi(str1.c_str())]);
+
+ Library->set_field (path, row[label_columns.field], str2);
+
Library->save_changes ();
}