diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-21 18:23:07 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-21 18:23:07 +0000 |
commit | f450df300c9c057141a4caf79ff6dbfbf58492d9 (patch) | |
tree | 409f9c56056a337cade83d45ccff47ccdb06dd0c /libs/midi++2 | |
parent | 738387f9a417537e768d56d3fc4afcb9dc82d66b (diff) |
fully implement and deploy explicit x-thread signal connection syntax (testing comes next)
git-svn-id: svn://localhost/ardour2/branches/3.0@6379 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2')
-rw-r--r-- | libs/midi++2/channel.cc | 37 | ||||
-rw-r--r-- | libs/midi++2/midi++/fd_midiport.h | 6 | ||||
-rw-r--r-- | libs/midi++2/mmc.cc | 2 | ||||
-rw-r--r-- | libs/midi++2/parser.cc | 2 |
4 files changed, 22 insertions, 25 deletions
diff --git a/libs/midi++2/channel.cc b/libs/midi++2/channel.cc index bf71b0579c..2760e8ae51 100644 --- a/libs/midi++2/channel.cc +++ b/libs/midi++2/channel.cc @@ -35,30 +35,29 @@ Channel::Channel (byte channelnum, Port &p) : _port (p) void Channel::connect_input_signals () { - _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)); + _port.input()->channel_pressure[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_chanpress, this, _1, _2)); + _port.input()->channel_note_on[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_note_on, this, _1, _2)); + _port.input()->channel_note_off[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_note_off, this, _1, _2)); + _port.input()->channel_poly_pressure[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_polypress, this, _1, _2)); + _port.input()->channel_program_change[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_program_change, this, _1, _2)); + _port.input()->channel_controller[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_controller, this, _1, _2)); + _port.input()->channel_pitchbend[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_pitchbend, this, _1, _2)); + + _port.input()->reset.connect_same_thread (*this, boost::bind (&Channel::process_reset, this, _1)); } void Channel::connect_output_signals () - { - _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)); + _port.output()->channel_pressure[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_chanpress, this, _1, _2)); + _port.output()->channel_note_on[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_note_on, this, _1, _2)); + _port.output()->channel_note_off[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_note_off, this, _1, _2)); + _port.output()->channel_poly_pressure[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_polypress, this, _1, _2)); + _port.output()->channel_program_change[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_program_change, this, _1, _2)); + _port.output()->channel_controller[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_controller, this, _1, _2)); + _port.output()->channel_pitchbend[_channel_number].connect_same_thread (*this, boost::bind (&Channel::process_pitchbend, this, _1, _2)); + + _port.output()->reset.connect_same_thread (*this, boost::bind (&Channel::process_reset, this, _1)); } void diff --git a/libs/midi++2/midi++/fd_midiport.h b/libs/midi++2/midi++/fd_midiport.h index 986ff5f0e0..673037cc5d 100644 --- a/libs/midi++2/midi++/fd_midiport.h +++ b/libs/midi++2/midi++/fd_midiport.h @@ -67,13 +67,11 @@ class FD_MidiPort : public Port bytes_written += nwritten; if (output_parser) { - output_parser->raw_preparse - (*output_parser, msg, nwritten); + output_parser->raw_preparse (*output_parser, msg, nwritten); for (int i = 0; i < nwritten; i++) { output_parser->scanner (msg[i]); } - output_parser->raw_postparse - (*output_parser, msg, nwritten); + output_parser->raw_postparse (*output_parser, msg, nwritten); } } return nwritten; diff --git a/libs/midi++2/mmc.cc b/libs/midi++2/mmc.cc index eb1c6cb5b0..6030230108 100644 --- a/libs/midi++2/mmc.cc +++ b/libs/midi++2/mmc.cc @@ -206,7 +206,7 @@ MachineControl::MachineControl (Port &p, float /*version*/, _send_device_id = 0x7f; if ((parser = _port.input()) != 0) { - parser->mmc.connect (mmc_connection, boost::bind (&MachineControl::process_mmc_message, this, _1, _2, _3)); + parser->mmc.connect_same_thread (mmc_connection, boost::bind (&MachineControl::process_mmc_message, this, _1, _2, _3)); } else { warning << "MMC connected to a non-input port: useless!" << endmsg; diff --git a/libs/midi++2/parser.cc b/libs/midi++2/parser.cc index 2efa77ae0b..af9cfafaca 100644 --- a/libs/midi++2/parser.cc +++ b/libs/midi++2/parser.cc @@ -316,7 +316,7 @@ Parser::trace (bool onoff, ostream *o, const string &prefix) cerr << "enabling tracing for port " << _port.name() << endl; trace_stream = o; trace_prefix = prefix; - any.connect (trace_connection, boost::bind (&Parser::trace_event, this, _1, _2, _3)); + any.connect_same_thread (trace_connection, boost::bind (&Parser::trace_event, this, _1, _2, _3)); } else { trace_prefix = ""; trace_stream = 0; |