mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
WebSockets: add record state support to surface
This commit is contained in:
parent
5105219076
commit
bfbb15011c
4 changed files with 19 additions and 1 deletions
|
|
@ -54,6 +54,7 @@ void
|
|||
WebsocketsDispatcher::update_all_nodes (Client client)
|
||||
{
|
||||
update (client, Node::transport_roll, globals ().transport_roll ());
|
||||
update (client, Node::record_state, globals ().record_state ());
|
||||
update (client, Node::tempo, globals ().tempo ());
|
||||
|
||||
for (uint32_t strip_n = 0; strip_n < strips ().strip_count (); ++strip_n) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ struct TransportObserver {
|
|||
struct RecordStateObserver {
|
||||
void operator() (ArdourFeedback* p)
|
||||
{
|
||||
// TO DO
|
||||
p->update_all (Node::record_state, p->globals ().record_state ());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,20 @@ ArdourGlobals::set_transport_roll (bool value)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ArdourGlobals::record_state () const
|
||||
{
|
||||
return static_cast<bool>(session ().get_record_enabled ());
|
||||
}
|
||||
|
||||
void
|
||||
ArdourGlobals::set_record_state (bool value)
|
||||
{
|
||||
if ((value && !record_state ()) || (!value && record_state ())) {
|
||||
basic_ui ().rec_enable_toggle ();
|
||||
}
|
||||
}
|
||||
|
||||
double
|
||||
ArdourGlobals::tempo () const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ public:
|
|||
bool transport_roll () const;
|
||||
void set_transport_roll (bool);
|
||||
|
||||
bool record_state () const;
|
||||
void set_record_state (bool);
|
||||
|
||||
double tempo () const;
|
||||
void set_tempo (double);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue