From 5fdfe49406db9de3431b099cd89a2233f43a6163 Mon Sep 17 00:00:00 2001 From: Taybin Rutkin Date: Thu, 3 Aug 2006 17:17:38 +0000 Subject: Most PluginManager refactoring is out of the way. Time to begin on AudioUnit support for real. git-svn-id: svn://localhost/ardour2/trunk@752 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/main.cc | 2 +- gtk2_ardour/plugin_selector.cc | 6 ++---- gtk2_ardour/plugin_selector.h | 7 ------- gtk2_ardour/plugin_ui.cc | 4 ++-- gtk2_ardour/redirect_box.cc | 12 ++++++------ 5 files changed, 11 insertions(+), 20 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index 778355c858..047bb130a4 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -446,7 +446,7 @@ int main (int argc, char *argv[]) try { engine = new ARDOUR::AudioEngine (jack_client_name); - ARDOUR::init (*engine, use_vst, try_hw_optimization); + ARDOUR::init (use_vst, try_hw_optimization); ui->set_engine (*engine); } catch (AudioEngine::NoBackendAvailable& err) { gui_jack_error (); diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index e2e6aa2add..e0a62b177f 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2000 Paul Davis + Copyright (C) 2000-2006 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -48,8 +48,6 @@ PluginSelector::PluginSelector (PluginManager *mgr) manager = mgr; session = 0; - o_selected_plug = -1; - i_selected_plug = 0; current_selection = PluginInfo::LADSPA; @@ -346,7 +344,7 @@ PluginSelector::use_plugin (PluginInfoPtr pi) return; } - boost::shared_ptr plugin = manager->load (*session, pi); + PluginPtr plugin = pi->load (*session); if (plugin) { PluginCreated (plugin); diff --git a/gtk2_ardour/plugin_selector.h b/gtk2_ardour/plugin_selector.h index 06c2f1d18e..583506972a 100644 --- a/gtk2_ardour/plugin_selector.h +++ b/gtk2_ardour/plugin_selector.h @@ -30,7 +30,6 @@ namespace ARDOUR { class Session; class PluginManager; - class PluginInfo; } class PluginSelector : public ArdourDialog @@ -134,12 +133,6 @@ class PluginSelector : public ArdourDialog void au_display_selection_changed(); #endif //HAVE_COREAUDIO - ARDOUR::PluginInfo* i_selected_plug; - - // We need an integer for the output side because - // the name isn't promised to be unique. - gint o_selected_plug; - ARDOUR::PluginManager *manager; static void _input_refiller (void *); diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index beddad4e16..5e5263b9ad 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -326,8 +326,8 @@ PluginUI::build (AudioEngine &engine) } } - n_ins = plugin->get_info().n_inputs; - n_outs = plugin->get_info().n_outputs; + n_ins = plugin->get_info()->n_inputs; + n_outs = plugin->get_info()->n_outputs; if (box->children().empty()) { hpacker.remove (*frame); diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc index 0455dfdeb4..74198265d9 100644 --- a/gtk2_ardour/redirect_box.cc +++ b/gtk2_ardour/redirect_box.cc @@ -378,7 +378,7 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, boost::shared_ptr /* i hate this kind of code */ - if (streams > p.get_info().n_inputs) { + if (streams > p.get_info()->n_inputs) { label.set_text (string_compose (_( "You attempted to add a plugin (%1).\n" "The plugin has %2 inputs\n" @@ -388,9 +388,9 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, boost::shared_ptr "This makes no sense - you are throwing away\n" "part of the signal."), p.name(), - p.get_info().n_inputs, + p.get_info()->n_inputs, streams)); - } else if (streams < p.get_info().n_inputs) { + } else if (streams < p.get_info()->n_inputs) { label.set_text (string_compose (_( "You attempted to add a plugin (%1).\n" "The plugin has %2 inputs\n" @@ -401,7 +401,7 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, boost::shared_ptr "side-chain inputs. A future version of Ardour will\n" "support this type of configuration."), p.name(), - p.get_info().n_inputs, + p.get_info()->n_inputs, streams)); } else { label.set_text (string_compose (_( @@ -415,8 +415,8 @@ RedirectBox::wierd_plugin_dialog (Plugin& p, uint32_t streams, boost::shared_ptr "\n" "Ardour does not understand what to do in such situations.\n"), p.name(), - p.get_info().n_inputs, - p.get_info().n_outputs, + p.get_info()->n_inputs, + p.get_info()->n_outputs, io->n_inputs(), io->n_outputs(), streams)); -- cgit v1.2.3