X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fltc_slave.cc;h=8d570aeeb8476047738a8c46b9968061eaac3d0a;hb=8a128b33d38172ae525ac798c53bc105bc4e2c64;hp=b4c4a1446bfde6e091949abaa72bc978aadbcc87;hpb=ea1ccb869a152d7344f498d2a062867f5bcf9d0b;p=ardour.git diff --git a/libs/ardour/ltc_slave.cc b/libs/ardour/ltc_slave.cc index b4c4a1446b..8d570aeeb8 100644 --- a/libs/ardour/ltc_slave.cc +++ b/libs/ardour/ltc_slave.cc @@ -19,11 +19,11 @@ */ #include #include -#include #include #include #include "pbd/error.h" +#include "pbd/pthread_utils.h" #include "ardour/debug.h" #include "ardour/slave.h" @@ -150,7 +150,7 @@ LTC_Slave::reset() } void -LTC_Slave::parse_ltc(const pframes_t nframes, const Sample* const in, const framecnt_t posinfo) +LTC_Slave::parse_ltc(const ARDOUR::pframes_t nframes, const Sample* const in, const ARDOUR::framecnt_t posinfo) { pframes_t i; unsigned char sound[8192]; @@ -432,7 +432,7 @@ LTC_Slave::speed_and_position (double& speed, framepos_t& pos) frameoffset_t skip = now - (monotonic_cnt + nframes); monotonic_cnt = now; - DEBUG_TRACE (DEBUG::LTC, string_compose ("speed_and_position - TID:%1 | latency: %2 | skip %3\n", ::pthread_self(), ltc_slave_latency.max, skip)); + DEBUG_TRACE (DEBUG::LTC, string_compose ("speed_and_position - TID:%1 | latency: %2 | skip %3\n", pthread_name(), ltc_slave_latency.max, skip)); if (last_timestamp == 0) { engine_dll_initstate = 0; @@ -590,8 +590,8 @@ LTC_Slave::approximate_current_delta() const } else if ((monotonic_cnt - last_timestamp) > 2 * frames_per_ltc_frame) { snprintf(delta, sizeof(delta), "%s", _("flywheel")); } else { - snprintf(delta, sizeof(delta), "\u0394%s%s%" PRIi64 "sm", - LEADINGZERO(abs(current_delta)), PLUSMINUS(-current_delta), abs(current_delta)); + snprintf(delta, sizeof(delta), "\u0394%s%s%lldsm", + LEADINGZERO(llabs(current_delta)), PLUSMINUS(-current_delta), llabs(current_delta)); } return std::string(delta); }