use new BasicUI and Session API to deal with transport state
This commit is contained in:
parent
a8cc5b1303
commit
e46e6f12a3
@ -486,6 +486,8 @@ MackieControlProtocol::set_active (bool yn)
|
||||
redisplay_connection = redisplay_timeout->connect (sigc::mem_fun (*this, &MackieControlProtocol::redisplay));
|
||||
redisplay_timeout->attach (main_loop()->get_context());
|
||||
|
||||
notify_transport_state_changed ();
|
||||
|
||||
} else {
|
||||
|
||||
BaseUI::quit ();
|
||||
@ -1342,11 +1344,11 @@ MackieControlProtocol::notify_transport_state_changed()
|
||||
}
|
||||
|
||||
// switch various play and stop buttons on / off
|
||||
update_global_button (Button::Loop, session->get_play_loop());
|
||||
update_global_button (Button::Play, session->transport_speed() == 1.0);
|
||||
update_global_button (Button::Stop, session->transport_stopped ());
|
||||
update_global_button (Button::Rewind, session->transport_speed() < 0.0);
|
||||
update_global_button (Button::Ffwd, session->transport_speed() > 1.0);
|
||||
update_global_button (Button::Loop, loop_button_onoff ());
|
||||
update_global_button (Button::Play, play_button_onoff ());
|
||||
update_global_button (Button::Stop, stop_button_onoff ());
|
||||
update_global_button (Button::Rewind, rewind_button_onoff ());
|
||||
update_global_button (Button::Ffwd, ffwd_button_onoff ());
|
||||
|
||||
// sometimes a return to start leaves time code at old time
|
||||
_timecode_last = string (10, ' ');
|
||||
|
@ -472,7 +472,7 @@ MackieControlProtocol::marker_release (Button &)
|
||||
|
||||
samplepos_t where = session->audible_sample();
|
||||
|
||||
if (session->transport_stopped() && session->locations()->mark_at (where, session->sample_rate() / 100.0)) {
|
||||
if (session->transport_stopped_or_stopping() && session->locations()->mark_at (where, session->sample_rate() / 100.0)) {
|
||||
return off;
|
||||
}
|
||||
|
||||
@ -501,7 +501,7 @@ MackieControlProtocol::stop_press (Button &)
|
||||
LedState
|
||||
MackieControlProtocol::stop_release (Button &)
|
||||
{
|
||||
return session->transport_stopped();
|
||||
return session->transport_stopped_or_stopping();
|
||||
}
|
||||
|
||||
LedState
|
||||
|
Loading…
Reference in New Issue
Block a user