Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
+#include <iostream>
#include <errno.h>
#include <poll.h>
#include <sys/types.h>
{
can_notify_on_unknown_rate = true;
+ last_mtc_fps_byte = session.get_mtc_smpte_bits ();
+
rebind (p);
reset ();
}
smpte.seconds = msg[1];
smpte.frames = msg[0];
+ last_mtc_fps_byte = msg[4];
+
switch (msg[4]) {
case MTC_24_FPS:
smpte.rate = 24;
default:
/* throttle error messages about unknown MTC rates */
if (can_notify_on_unknown_rate) {
- error << _("Unknown rate/drop value in incoming MTC stream, session values used instead") << endmsg;
+ error << string_compose (_("Unknown rate/drop value %1 in incoming MTC stream, session values used instead"),
+ (int) msg[4])
+ << endmsg;
can_notify_on_unknown_rate = false;
}
smpte.rate = session.smpte_frames_per_second();
void
MTC_Slave::handle_locate (const MIDI::byte* mmc_tc)
{
- MIDI::byte mtc[4];
+ MIDI::byte mtc[5];
+ mtc[4] = last_mtc_fps_byte;
mtc[3] = mmc_tc[0] & 0xf; /* hrs only */
mtc[2] = mmc_tc[1];
mtc[1] = mmc_tc[2];
return true;
}
-nframes_t
+ARDOUR::nframes_t
MTC_Slave::resolution() const
{
return (nframes_t) session.frames_per_smpte_frame();