summaryrefslogtreecommitdiff
path: root/libs/midi++2/channel.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-19 20:26:31 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-19 20:26:31 +0000
commitaae367b63c9b619db1e40f27dc334c6987219481 (patch)
tree142f6ffed6bb749e24a06343587cad6b966888bd /libs/midi++2/channel.cc
parent67460c2af45d0455e64623572480c064445c2e5b (diff)
use new syntax for connecting to backend signals that enforces explicit connection scope, plus a few other related matters
git-svn-id: svn://localhost/ardour2/branches/3.0@6376 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2/channel.cc')
-rw-r--r--libs/midi++2/channel.cc50
1 files changed, 18 insertions, 32 deletions
diff --git a/libs/midi++2/channel.cc b/libs/midi++2/channel.cc
index 9e339654b4..bf71b0579c 100644
--- a/libs/midi++2/channel.cc
+++ b/libs/midi++2/channel.cc
@@ -35,44 +35,30 @@ Channel::Channel (byte channelnum, Port &p) : _port (p)
void
Channel::connect_input_signals ()
{
- add_connection (_port.input()->channel_pressure[_channel_number].connect
- (boost::bind (&Channel::process_chanpress, this, _1, _2)));
- add_connection (_port.input()->channel_note_on[_channel_number].connect
- (boost::bind (&Channel::process_note_on, this, _1, _2)));
- add_connection (_port.input()->channel_note_off[_channel_number].connect
- (boost::bind (&Channel::process_note_off, this, _1, _2)));
- add_connection (_port.input()->channel_poly_pressure[_channel_number].connect
- (boost::bind (&Channel::process_polypress, this, _1, _2)));
- add_connection (_port.input()->channel_program_change[_channel_number].connect
- (boost::bind (&Channel::process_program_change, this, _1, _2)));
- add_connection (_port.input()->channel_controller[_channel_number].connect
- (boost::bind (&Channel::process_controller, this, _1, _2)));
- add_connection (_port.input()->channel_pitchbend[_channel_number].connect
- (boost::bind (&Channel::process_pitchbend, this, _1, _2)));
-
- add_connection (_port.input()->reset.connect (boost::bind (&Channel::process_reset, this, _1)));
+ _port.input()->channel_pressure[_channel_number].connect (*this, boost::bind (&Channel::process_chanpress, this, _1, _2));
+ _port.input()->channel_note_on[_channel_number].connect (*this, boost::bind (&Channel::process_note_on, this, _1, _2));
+ _port.input()->channel_note_off[_channel_number].connect (*this, boost::bind (&Channel::process_note_off, this, _1, _2));
+ _port.input()->channel_poly_pressure[_channel_number].connect (*this, boost::bind (&Channel::process_polypress, this, _1, _2));
+ _port.input()->channel_program_change[_channel_number].connect (*this, boost::bind (&Channel::process_program_change, this, _1, _2));
+ _port.input()->channel_controller[_channel_number].connect (*this, boost::bind (&Channel::process_controller, this, _1, _2));
+ _port.input()->channel_pitchbend[_channel_number].connect (*this, boost::bind (&Channel::process_pitchbend, this, _1, _2));
+
+ _port.input()->reset.connect (*this, boost::bind (&Channel::process_reset, this, _1));
}
void
Channel::connect_output_signals ()
{
- add_connection (_port.output()->channel_pressure[_channel_number].connect
- (boost::bind (&Channel::process_chanpress, this, _1, _2)));
- add_connection (_port.output()->channel_note_on[_channel_number].connect
- (boost::bind (&Channel::process_note_on, this, _1, _2)));
- add_connection (_port.output()->channel_note_off[_channel_number].connect
- (boost::bind (&Channel::process_note_off, this, _1, _2)));
- add_connection (_port.output()->channel_poly_pressure[_channel_number].connect
- (boost::bind (&Channel::process_polypress, this, _1, _2)));
- add_connection (_port.output()->channel_program_change[_channel_number].connect
- (boost::bind (&Channel::process_program_change, this, _1, _2)));
- add_connection (_port.output()->channel_controller[_channel_number].connect
- (boost::bind (&Channel::process_controller, this, _1, _2)));
- add_connection (_port.output()->channel_pitchbend[_channel_number].connect
- (boost::bind (&Channel::process_pitchbend, this, _1, _2)));
-
- add_connection (_port.output()->reset.connect (boost::bind (&Channel::process_reset, this, _1)));
+ _port.output()->channel_pressure[_channel_number].connect (*this, boost::bind (&Channel::process_chanpress, this, _1, _2));
+ _port.output()->channel_note_on[_channel_number].connect (*this, boost::bind (&Channel::process_note_on, this, _1, _2));
+ _port.output()->channel_note_off[_channel_number].connect (*this, boost::bind (&Channel::process_note_off, this, _1, _2));
+ _port.output()->channel_poly_pressure[_channel_number].connect (*this, boost::bind (&Channel::process_polypress, this, _1, _2));
+ _port.output()->channel_program_change[_channel_number].connect (*this, boost::bind (&Channel::process_program_change, this, _1, _2));
+ _port.output()->channel_controller[_channel_number].connect (*this, boost::bind (&Channel::process_controller, this, _1, _2));
+ _port.output()->channel_pitchbend[_channel_number].connect (*this, boost::bind (&Channel::process_pitchbend, this, _1, _2));
+
+ _port.output()->reset.connect (*this, boost::bind (&Channel::process_reset, this, _1));
}
void