summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-01-30 07:40:13 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-01-30 07:40:13 +0000
commit70b939da4f9d4097160e32f2373a7a5ff8f4957f (patch)
tree5917e5847c75e441c9df550d5101352d18e8286f /gtk2_ardour
parentee62ee07d39f51ba1b70f390dc2158c57f54a572 (diff)
first pass at internal sends. this is a very tentative work in progress, and it is possible that major changes may follow in the near future. it is certainly not complete, but the fundamental changes to Port/Buffer operation merit a commit at this point
git-svn-id: svn://localhost/ardour2/branches/3.0@4464 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour_ui.cc2
-rw-r--r--gtk2_ardour/editor.h2
-rw-r--r--gtk2_ardour/editor_route_list.cc8
-rw-r--r--gtk2_ardour/export_channel_selector.cc4
-rw-r--r--gtk2_ardour/gain_meter.cc11
-rw-r--r--gtk2_ardour/mixer_ui.cc8
-rw-r--r--gtk2_ardour/mixer_ui.h2
-rw-r--r--gtk2_ardour/plugin_ui.cc6
-rw-r--r--gtk2_ardour/port_group.cc4
-rw-r--r--gtk2_ardour/port_matrix.cc4
-rw-r--r--gtk2_ardour/processor_box.cc16
-rw-r--r--gtk2_ardour/route_params_ui.cc6
-rw-r--r--gtk2_ardour/route_params_ui.h2
13 files changed, 47 insertions, 28 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index e51edbb631..9298353cab 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -1273,7 +1273,7 @@ void
ARDOUR_UI::session_add_audio_route (bool track, int32_t input_channels, int32_t output_channels, ARDOUR::TrackMode mode, uint32_t how_many)
{
list<boost::shared_ptr<AudioTrack> > tracks;
- Session::RouteList routes;
+ RouteList routes;
if (session == 0) {
warning << _("You cannot add a track or bus without a session already loaded.") << endmsg;
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index aaaa7397e8..379716ed36 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -595,7 +595,7 @@ class Editor : public PublicEditor
void add_item_with_sensitivity (Gtk::Menu_Helpers::MenuList&, Gtk::Menu_Helpers::MenuElem, bool) const;
- void handle_new_route (ARDOUR::Session::RouteList&);
+ void handle_new_route (ARDOUR::RouteList&);
void remove_route (TimeAxisView *);
bool route_removal;
diff --git a/gtk2_ardour/editor_route_list.cc b/gtk2_ardour/editor_route_list.cc
index 52a1f62243..2847416397 100644
--- a/gtk2_ardour/editor_route_list.cc
+++ b/gtk2_ardour/editor_route_list.cc
@@ -48,7 +48,7 @@ using namespace Glib;
const char* _order_key = N_("editor");
void
-Editor::handle_new_route (Session::RouteList& routes)
+Editor::handle_new_route (RouteList& routes)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::handle_new_route), routes));
@@ -60,7 +60,7 @@ Editor::handle_new_route (Session::RouteList& routes)
route_redisplay_does_not_sync_order_keys = true;
no_route_list_redisplay = true;
- for (Session::RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
+ for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
boost::shared_ptr<Route> route = (*x);
if (route->is_hidden()) {
@@ -592,8 +592,8 @@ struct EditorOrderRouteSorter {
void
Editor::initial_route_list_display ()
{
- boost::shared_ptr<Session::RouteList> routes = session->get_routes();
- Session::RouteList r (*routes);
+ boost::shared_ptr<RouteList> routes = session->get_routes();
+ RouteList r (*routes);
EditorOrderRouteSorter sorter;
r.sort (sorter);
diff --git a/gtk2_ardour/export_channel_selector.cc b/gtk2_ardour/export_channel_selector.cc
index f01a029c0c..62380c1604 100644
--- a/gtk2_ardour/export_channel_selector.cc
+++ b/gtk2_ardour/export_channel_selector.cc
@@ -105,14 +105,14 @@ void
PortExportChannelSelector::fill_route_list ()
{
channel_view.clear_routes ();
- Session::RouteList routes = *session->get_routes();
+ RouteList routes = *session->get_routes();
/* Add master bus and then everything else */
ARDOUR::IO * master = session->master_out().get();
channel_view.add_route (master);
- for (Session::RouteList::iterator it = routes.begin(); it != routes.end(); ++it) {
+ for (RouteList::iterator it = routes.begin(); it != routes.end(); ++it) {
if (it->get() == master) {
continue;
}
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc
index a74df66bc0..8438147746 100644
--- a/gtk2_ardour/gain_meter.cc
+++ b/gtk2_ardour/gain_meter.cc
@@ -35,6 +35,7 @@
#include <gtkmm2ext/gtk_ui.h>
#include <midi++/manager.h>
#include <pbd/fastlog.h>
+#include <pbd/stacktrace.h>
#include "ardour_ui.h"
#include "gain_meter.h"
@@ -160,6 +161,8 @@ GainMeterBase::~GainMeterBase ()
void
GainMeterBase::set_io (boost::shared_ptr<IO> io)
{
+ cerr << this << " Clear all connections\n";
+
connections.clear ();
_io = io;
@@ -200,6 +203,8 @@ GainMeterBase::set_io (boost::shared_ptr<IO> io)
}
}
+ cerr << "Connect " << this << " to gain change for " << _io->name() << endl;
+
connections.push_back (_io->gain_control()->Changed.connect (mem_fun(*this, &GainMeterBase::gain_changed)));
gain_changed ();
@@ -371,8 +376,11 @@ GainMeterBase::show_gain ()
void
GainMeterBase::gain_adjusted ()
{
+ cerr << this << " for " << _io->name() << " GAIN ADJUSTED\n";
if (!ignore_toggle) {
+ cerr << "Set GC\n";
_io->gain_control()->set_value (slider_position_to_gain (gain_adjustment.get_value()));
+ cerr << "Set GC OUT\n";
}
show_gain ();
}
@@ -382,6 +390,9 @@ GainMeterBase::effective_gain_display ()
{
gfloat value = gain_to_slider_position (_io->effective_gain());
+ cerr << this << " for " << _io->name() << " EGAIN = " << value << " AGAIN = " << gain_adjustment.get_value () << endl;
+ // stacktrace (cerr, 20);
+
if (gain_adjustment.get_value() != value) {
ignore_toggle = true;
gain_adjustment.set_value (value);
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc
index 06b30c700c..2c223f5bda 100644
--- a/gtk2_ardour/mixer_ui.cc
+++ b/gtk2_ardour/mixer_ui.cc
@@ -297,7 +297,7 @@ Mixer_UI::hide_window (GdkEventAny *ev)
void
-Mixer_UI::add_strip (Session::RouteList& routes)
+Mixer_UI::add_strip (RouteList& routes)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::add_strip), routes));
@@ -306,7 +306,7 @@ Mixer_UI::add_strip (Session::RouteList& routes)
no_track_list_redisplay = true;
strip_redisplay_does_not_sync_order_keys = true;
- for (Session::RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
+ for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
boost::shared_ptr<Route> route = (*x);
if (route->is_hidden()) {
@@ -885,8 +885,8 @@ struct SignalOrderRouteSorter {
void
Mixer_UI::initial_track_display ()
{
- boost::shared_ptr<Session::RouteList> routes = session->get_routes();
- Session::RouteList copy (*routes);
+ boost::shared_ptr<RouteList> routes = session->get_routes();
+ RouteList copy (*routes);
SignalOrderRouteSorter sorter;
copy.sort (sorter);
diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h
index 2b48ade6e0..f5e1ae211d 100644
--- a/gtk2_ardour/mixer_ui.h
+++ b/gtk2_ardour/mixer_ui.h
@@ -120,7 +120,7 @@ class Mixer_UI : public Gtk::Window
bool strip_scroller_button_release (GdkEventButton*);
- void add_strip (ARDOUR::Session::RouteList&);
+ void add_strip (ARDOUR::RouteList&);
void remove_strip (MixerStrip *);
void hide_all_strips (bool with_select);
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index dbb5f3969e..336b7ea3df 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -429,7 +429,11 @@ PlugUIBase::bypass_toggled ()
bool x;
if ((x = bypass_button.get_active()) == insert->active()) {
- insert->set_active (!x);
+ if (x) {
+ insert->deactivate ();
+ } else {
+ insert->activate ();
+ }
}
}
diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc
index af2fd24bc5..e68c8364ec 100644
--- a/gtk2_ardour/port_group.cc
+++ b/gtk2_ardour/port_group.cc
@@ -142,9 +142,9 @@ PortGroupList::gather (ARDOUR::Session& session)
/* Find the bundles for routes. We take their bundles, copy them,
and add ports from the route's processors */
- boost::shared_ptr<ARDOUR::Session::RouteList> routes = session.get_routes ();
+ boost::shared_ptr<ARDOUR::RouteList> routes = session.get_routes ();
- for (ARDOUR::Session::RouteList::const_iterator i = routes->begin(); i != routes->end(); ++i) {
+ for (ARDOUR::RouteList::const_iterator i = routes->begin(); i != routes->end(); ++i) {
/* Copy the appropriate bundle from the route */
boost::shared_ptr<ARDOUR::Bundle> bundle (
new ARDOUR::Bundle (
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index c080b3365d..55cd6a46b5 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -89,8 +89,8 @@ PortMatrix::routes_changed ()
i->disconnect ();
}
- boost::shared_ptr<ARDOUR::Session::RouteList> routes = _session.get_routes ();
- for (ARDOUR::Session::RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
+ boost::shared_ptr<ARDOUR::RouteList> routes = _session.get_routes ();
+ for (ARDOUR::RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
_route_connections.push_back (
(*i)->processors_changed.connect (sigc::mem_fun (*this, &PortMatrix::setup))
);
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 0c97c59ae4..567dc2985f 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -342,7 +342,11 @@ ProcessorBox::processor_button_release_event (GdkEventButton *ev)
/* button2-click with no modifiers */
- processor->set_active (!processor->active());
+ if (processor->active()) {
+ processor->deactivate ();
+ } else {
+ processor->activate ();
+ }
ret = true;
}
@@ -396,7 +400,7 @@ ProcessorBox::use_plugins (const SelectedPlugins& plugins)
Route::ProcessorStreams err_streams;
if (Config->get_new_plugins_active()) {
- processor->set_active (true);
+ processor->activate ();
}
if (_route->add_processor (processor, &err_streams)) {
@@ -405,7 +409,7 @@ ProcessorBox::use_plugins (const SelectedPlugins& plugins)
} else {
if (Profile->get_sae()) {
- processor->set_active (true);
+ processor->activate ();
}
processor->ActiveChanged.connect (bind (mem_fun (*this, &ProcessorBox::show_processor_active), boost::weak_ptr<Processor>(processor)));
}
@@ -545,7 +549,7 @@ ProcessorBox::send_io_finished (IOSelector::Result r, boost::weak_ptr<Processor>
case IOSelector::Accepted:
_route->add_processor (processor);
if (Profile->get_sae()) {
- processor->set_active (true);
+ processor->activate ();
}
break;
}
@@ -982,13 +986,13 @@ could not match the configuration of this track.");
void
ProcessorBox::activate_processor (boost::shared_ptr<Processor> r)
{
- r->set_active (true);
+ r->activate ();
}
void
ProcessorBox::deactivate_processor (boost::shared_ptr<Processor> r)
{
- r->set_active (false);
+ r->deactivate ();
}
void
diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc
index 13807a1521..30a939022e 100644
--- a/gtk2_ardour/route_params_ui.cc
+++ b/gtk2_ardour/route_params_ui.cc
@@ -171,11 +171,11 @@ RouteParams_UI::~RouteParams_UI ()
}
void
-RouteParams_UI::add_routes (Session::RouteList& routes)
+RouteParams_UI::add_routes (RouteList& routes)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::add_routes), routes));
- for (Session::RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
+ for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
boost::shared_ptr<Route> route = (*x);
if (route->is_hidden()) {
@@ -423,7 +423,7 @@ RouteParams_UI::set_session (Session *sess)
route_display_model->clear();
if (session) {
- boost::shared_ptr<Session::RouteList> r = session->get_routes();
+ boost::shared_ptr<RouteList> r = session->get_routes();
add_routes (*r);
session->GoingAway.connect (mem_fun(*this, &ArdourDialog::session_gone));
session->RouteAdded.connect (mem_fun(*this, &RouteParams_UI::add_routes));
diff --git a/gtk2_ardour/route_params_ui.h b/gtk2_ardour/route_params_ui.h
index e9fca333ab..a41a092440 100644
--- a/gtk2_ardour/route_params_ui.h
+++ b/gtk2_ardour/route_params_ui.h
@@ -167,7 +167,7 @@ class RouteParams_UI : public ArdourDialog
Glib::RefPtr<Gtk::ListStore> route_display_model;
- void add_routes (ARDOUR::Session::RouteList&);
+ void add_routes (ARDOUR::RouteList&);
void route_name_changed (boost::shared_ptr<ARDOUR::Route> route);
void route_removed (boost::shared_ptr<ARDOUR::Route> route);