websockets provide BBT
This commit is contained in:
parent
c9a1dfb928
commit
93987de09f
@ -62,13 +62,13 @@ WebsocketsDispatcher::update_all_nodes (Client client)
|
||||
|
||||
AddressVector strip_addr = AddressVector ();
|
||||
strip_addr.push_back (strip_id);
|
||||
|
||||
|
||||
ValueVector strip_desc = ValueVector ();
|
||||
strip_desc.push_back (strip.name ());
|
||||
strip_desc.push_back ((int)strip.stripable ()->presentation_info ().flags ());
|
||||
|
||||
|
||||
update (client, Node::strip_description, strip_addr, strip_desc);
|
||||
|
||||
|
||||
update (client, Node::strip_gain, strip_id, strip.gain ());
|
||||
update (client, Node::strip_mute, strip_id, strip.mute ());
|
||||
|
||||
@ -130,6 +130,7 @@ WebsocketsDispatcher::update_all_nodes (Client client)
|
||||
|
||||
update (client, Node::transport_tempo, transport ().tempo ());
|
||||
update (client, Node::transport_time, transport ().time ());
|
||||
update (client, Node::transport_bbt, transport ().bbt ());
|
||||
update (client, Node::transport_roll, transport ().roll ());
|
||||
update (client, Node::transport_record, transport ().record ());
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ struct PluginParamValueObserver {
|
||||
if (!control) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
p->update_all (Node::strip_plugin_param_value, strip_id, plugin_id, param_id,
|
||||
ArdourMixerPlugin::param_value (control));
|
||||
}
|
||||
@ -149,7 +149,7 @@ ArdourFeedback::stop ()
|
||||
|
||||
_periodic_connection.disconnect ();
|
||||
_transport_connections.drop_connections ();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -210,6 +210,7 @@ bool
|
||||
ArdourFeedback::poll () const
|
||||
{
|
||||
update_all (Node::transport_time, transport ().time ());
|
||||
update_all (Node::transport_bbt, transport ().bbt ());
|
||||
|
||||
Glib::Threads::Mutex::Lock lock (mixer ().mutex ());
|
||||
|
||||
|
@ -44,6 +44,7 @@ namespace Node
|
||||
const std::string strip_plugin_param_value = "strip_plugin_param_value";
|
||||
const std::string transport_tempo = "transport_tempo";
|
||||
const std::string transport_time = "transport_time";
|
||||
const std::string transport_bbt = "transport_bbt";
|
||||
const std::string transport_roll = "transport_roll";
|
||||
const std::string transport_record = "transport_record";
|
||||
} // namespace Node
|
||||
|
@ -16,6 +16,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "ardour/tempo.h"
|
||||
|
||||
#include "transport.h"
|
||||
@ -52,6 +54,16 @@ ArdourTransport::time () const
|
||||
return static_cast<double>(t) / static_cast<double>(f);
|
||||
}
|
||||
|
||||
std::string
|
||||
ArdourTransport::bbt () const
|
||||
{
|
||||
const samplepos_t t = session ().transport_sample ();
|
||||
const Temporal::BBT_Time bbt_time = Temporal::TempoMap::fetch()->bbt_at (timepos_t (t));
|
||||
std::ostringstream oss;
|
||||
bbt_time.print_padded(oss);
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
bool
|
||||
ArdourTransport::roll () const
|
||||
{
|
||||
|
@ -19,6 +19,8 @@
|
||||
#ifndef _ardour_surface_websockets_transport_h_
|
||||
#define _ardour_surface_websockets_transport_h_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "component.h"
|
||||
|
||||
namespace ArdourSurface {
|
||||
@ -35,6 +37,8 @@ public:
|
||||
|
||||
double time () const;
|
||||
|
||||
std::string bbt () const;
|
||||
|
||||
bool roll () const;
|
||||
void set_roll (bool);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user