/* Launch Control XL ports might already be there */
port_registration_handler ();
- session->RouteAdded.connect (session_connections, invalidator(*this), boost::bind (&LaunchControlXL::stripables_added, this), lcxl);
- session->vca_manager().VCAAdded.connect (session_connections, invalidator (*this), boost::bind (&LaunchControlXL::stripables_added, this), lcxl);
+ session->RouteAdded.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::stripables_added, this), lcxl);
+ session->vca_manager().VCAAdded.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::stripables_added, this), lcxl);
switch_bank (bank_start);
}
/* do this before stopping the event loop, so that we don't get any notifications */
port_reg_connection.disconnect ();
port_connection.disconnect ();
+ session_connections.drop_connections ();
+ stripable_connections.drop_connections ();
stop_using_device ();
ports_release ();
NoteButton* nb = id_note_button_map[*x];
if (cb != 0) {
cb->timeout_connection.disconnect();
- }
- else if (nb != 0) {
+ } else if (nb != 0) {
nb->timeout_connection.disconnect();
}
}
buttons_down.insert(button->id());
DEBUG_TRACE(DEBUG::LaunchControlXL, string_compose("button pressed: %1\n", LaunchControlXL::button_name_by_id(button->id())));
start_press_timeout(button, button->id());
- }
- else {
+ } else {
DEBUG_TRACE(DEBUG::LaunchControlXL, string_compose("button depressed: %1\n", LaunchControlXL::button_name_by_id(button->id())));
buttons_down.erase(button->id());
button->timeout_connection.disconnect();
if (c == consumed.end()) {
if (ev->value == 0) {
(this->*button->release_method)();
- }
- else {
+ } else {
(this->*button->press_method)();
}
- }
- else {
+ } else {
DEBUG_TRACE(DEBUG::LaunchControlXL, "button was consumed, ignored\n");
consumed.erase(c);
}
if (knob->id() < 8) { // sendA
ac = stripable[chan]->trim_control();
- }
- else if (knob->id() >= 8 && knob->id() < 16) { // sendB
+ } else if (knob->id() >= 8 && knob->id() < 16) { // sendB
ac = stripable[chan]->pan_width_control();
- }
- else if (knob->id() >= 16 && knob->id() < 24) { // pan
+ } else if (knob->id() >= 16 && knob->id() < 24) { // pan
ac = stripable[chan]->pan_azimuth_control();
}
// DEBUG_TRACE (DEBUG::LaunchControlXL, string_compose ("CC %1 (value %2)\n", (int) ev->controller_number, (int) ev->value));
CCControllerButtonMap::iterator b = cc_controller_button_map.find (ev->controller_number);
- CCFaderMap::iterator f = cc_fader_map.find (ev->controller_number);
+ CCFaderMap::iterator f = cc_fader_map.find (ev->controller_number);
CCKnobMap::iterator k = cc_knob_map.find (ev->controller_number);
if (b != cc_controller_button_map.end()) {
Button* button = b->second;
handle_button_message(button, ev);
- }
- else if (f != cc_fader_map.end()) {
+ } else if (f != cc_fader_map.end()) {
Fader* fader = f->second;
fader->set_value(ev->value);
handle_fader_message(fader);
- }
- else if (k != cc_knob_map.end()) {
+ } else if (k != cc_knob_map.end()) {
Knob* knob = k->second;
knob->set_value(ev->value);
handle_knob_message(knob);
NNNoteButtonMap::iterator b = nn_note_button_map.find (ev->controller_number);
if (b != nn_note_button_map.end()) {
- Button* button = b->second;
- handle_button_message(button, ev);
- }
+ Button* button = b->second;
+ handle_button_message(button, ev);
+ }
}
void LaunchControlXL::handle_midi_note_off_message(MIDI::Parser & parser, MIDI::EventTwoBytes *ev, MIDI::channel_t chan)
if (stripable[n]) {
/* stripable goes away? refill the bank, starting at the same point */
- stripable[n]->DropReferences.connect (stripable_connections, invalidator (*this), boost::bind (&LaunchControlXL::switch_bank, this, bank_start), lcxl);
- stripable[n]->presentation_info().PropertyChanged.connect (stripable_connections, invalidator (*this), boost::bind (&LaunchControlXL::stripable_property_change, this, _1, n), lcxl);
- stripable[n]->solo_control()->Changed.connect (stripable_connections, invalidator (*this), boost::bind (&LaunchControlXL::solo_changed, this, n), lcxl);
- stripable[n]->mute_control()->Changed.connect (stripable_connections, invalidator (*this), boost::bind (&LaunchControlXL::mute_changed, this, n), lcxl);
+ stripable[n]->DropReferences.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::switch_bank, this, bank_start), lcxl);
+ stripable[n]->presentation_info().PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::stripable_property_change, this, _1, n), lcxl);
+ stripable[n]->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::solo_changed, this, n), lcxl);
+ stripable[n]->mute_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::mute_changed, this, n), lcxl);
if (stripable[n]->rec_enable_control()) {
- stripable[n]->rec_enable_control()->Changed.connect (stripable_connections, invalidator (*this), boost::bind (&LaunchControlXL::rec_changed, this, n), lcxl);
+ stripable[n]->rec_enable_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&LaunchControlXL::rec_changed, this, n), lcxl);
}