mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 05:36:31 +01:00
OSC, update marks list better.
This commit is contained in:
parent
e4a6e981d9
commit
ab7c6e74e0
1 changed files with 8 additions and 3 deletions
|
|
@ -115,7 +115,6 @@ OSCGlobalObserver::OSCGlobalObserver (OSC& o, Session& s, ArdourSurface::OSC::OS
|
||||||
session->TransportLooped.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_transport_state_changed, this), OSC::instance());
|
session->TransportLooped.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_transport_state_changed, this), OSC::instance());
|
||||||
session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_record_state_changed, this), OSC::instance());
|
session->RecordStateChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::send_record_state_changed, this), OSC::instance());
|
||||||
send_record_state_changed ();
|
send_record_state_changed ();
|
||||||
session->locations_modified.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&OSCGlobalObserver::marks_changed, this), OSC::instance());
|
|
||||||
marks_changed ();
|
marks_changed ();
|
||||||
|
|
||||||
// session feedback
|
// session feedback
|
||||||
|
|
@ -287,6 +286,10 @@ OSCGlobalObserver::tick ()
|
||||||
}
|
}
|
||||||
_last_sample = now_sample;
|
_last_sample = now_sample;
|
||||||
mark_update ();
|
mark_update ();
|
||||||
|
} else {
|
||||||
|
if (!_heartbeat) {
|
||||||
|
marks_changed ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (feedback[3]) { //heart beat enabled
|
if (feedback[3]) { //heart beat enabled
|
||||||
if (_heartbeat == 10) {
|
if (_heartbeat == 10) {
|
||||||
|
|
@ -295,8 +298,6 @@ OSCGlobalObserver::tick ()
|
||||||
if (!_heartbeat) {
|
if (!_heartbeat) {
|
||||||
_osc.float_message (X_("/heartbeat"), 0.0, addr);
|
_osc.float_message (X_("/heartbeat"), 0.0, addr);
|
||||||
}
|
}
|
||||||
_heartbeat++;
|
|
||||||
if (_heartbeat > 20) _heartbeat = 0;
|
|
||||||
}
|
}
|
||||||
if (feedback[7] || feedback[8] || feedback[9]) { // meters enabled
|
if (feedback[7] || feedback[8] || feedback[9]) { // meters enabled
|
||||||
// the only meter here is master
|
// the only meter here is master
|
||||||
|
|
@ -343,6 +344,8 @@ OSCGlobalObserver::tick ()
|
||||||
}
|
}
|
||||||
extra_check ();
|
extra_check ();
|
||||||
}
|
}
|
||||||
|
_heartbeat++;
|
||||||
|
if (_heartbeat > 20) _heartbeat = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -423,8 +426,10 @@ OSCGlobalObserver::send_transport_state_changed()
|
||||||
void
|
void
|
||||||
OSCGlobalObserver::marks_changed ()
|
OSCGlobalObserver::marks_changed ()
|
||||||
{
|
{
|
||||||
|
lm.clear();
|
||||||
const Locations::LocationList& ll (session->locations ()->list ());
|
const Locations::LocationList& ll (session->locations ()->list ());
|
||||||
// get Locations that are marks
|
// get Locations that are marks
|
||||||
|
std::cout << "marks changed\n";
|
||||||
for (Locations::LocationList::const_iterator l = ll.begin(); l != ll.end(); ++l) {
|
for (Locations::LocationList::const_iterator l = ll.begin(); l != ll.end(); ++l) {
|
||||||
if ((*l)->is_session_range ()) {
|
if ((*l)->is_session_range ()) {
|
||||||
lm.push_back (LocationMarker(_("start"), (*l)->start ()));
|
lm.push_back (LocationMarker(_("start"), (*l)->start ()));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue