provide new methods for BasicUI that wrap the "complexity" of how to show transport state via lit buttons
This commit is contained in:
parent
6383d4f6a6
commit
a8cc5b1303
@ -188,7 +188,7 @@ BasicUI::remove_marker_at_playhead ()
|
||||
void
|
||||
BasicUI::rewind ()
|
||||
{
|
||||
session->request_transport_speed (session->transport_speed() - 1.5);
|
||||
session->request_transport_speed (session->actual_speed() - 1.5);
|
||||
}
|
||||
|
||||
void
|
||||
@ -203,6 +203,36 @@ BasicUI::transport_stop ()
|
||||
session->request_transport_speed (0.0);
|
||||
}
|
||||
|
||||
bool
|
||||
BasicUI::stop_button_onoff () const
|
||||
{
|
||||
return session->transport_stopped_or_stopping ();
|
||||
}
|
||||
|
||||
bool
|
||||
BasicUI::play_button_onoff () const
|
||||
{
|
||||
return session->actual_speed() == 1.0;
|
||||
}
|
||||
|
||||
bool
|
||||
BasicUI::ffwd_button_onoff () const
|
||||
{
|
||||
return session->actual_speed() > 1.0;
|
||||
}
|
||||
|
||||
bool
|
||||
BasicUI::rewind_button_onoff () const
|
||||
{
|
||||
return session->actual_speed() < 0.0;
|
||||
}
|
||||
|
||||
bool
|
||||
BasicUI::loop_button_onoff () const
|
||||
{
|
||||
return session->get_play_loop();
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::transport_play (bool from_last_start)
|
||||
{
|
||||
|
@ -151,6 +151,12 @@ class LIBCONTROLCP_API BasicUI {
|
||||
void timecode_to_sample (Timecode::Time& timecode, samplepos_t & sample, bool use_offset, bool use_subframes) const;
|
||||
void sample_to_timecode (samplepos_t sample, Timecode::Time& timecode, bool use_offset, bool use_subframes) const;
|
||||
|
||||
bool stop_button_onoff() const;
|
||||
bool play_button_onoff() const;
|
||||
bool ffwd_button_onoff() const;
|
||||
bool rewind_button_onoff() const;
|
||||
bool loop_button_onoff() const;
|
||||
|
||||
protected:
|
||||
BasicUI ();
|
||||
ARDOUR::Session* session;
|
||||
|
Loading…
Reference in New Issue
Block a user