diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-24 02:28:51 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-24 02:28:51 +0000 |
commit | 33140f32671576a285d62f529447f941f96313fc (patch) | |
tree | 44faee5b21e3181077d0c22180895fb072432a53 /libs/ardour/ticker.cc | |
parent | 10d37fecc1b54487a5fb0f3652bfb45a5224ef8b (diff) |
add support for IP MIDI (multicast MIDI over IP UDP sockets) to ardour and use it if requested inside MCP code. required renaming the pre-existing MIDI::Port as MIDI:JackMIDIPort - MIDI::Port becomes the base type for both JackMIDIPort and IPMIDIPort
git-svn-id: svn://localhost/ardour2/branches/3.0@12069 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ticker.cc')
-rw-r--r-- | libs/ardour/ticker.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/ticker.cc b/libs/ardour/ticker.cc index 734b401356..5d078952a1 100644 --- a/libs/ardour/ticker.cc +++ b/libs/ardour/ticker.cc @@ -20,6 +20,7 @@ #include "pbd/stacktrace.h" #include "midi++/port.h" +#include "midi++/jack_midi_port.h" #include "midi++/manager.h" #include "evoral/midi_events.h" @@ -152,13 +153,13 @@ void MidiClockTicker::tick (const framepos_t& transport_frame) double next_tick = _last_tick + one_ppqn_in_frames (transport_frame); frameoffset_t next_tick_offset = llrint (next_tick) - transport_frame; + MIDI::JackMIDIPort* mp = dynamic_cast<MIDI::JackMIDIPort*> (_midi_port); + DEBUG_TRACE (PBD::DEBUG::MidiClock, string_compose ("Transport: %1, last tick time: %2, next tick time: %3, offset: %4, cycle length: %5\n", - transport_frame, _last_tick, next_tick, next_tick_offset, _midi_port->nframes_this_cycle() - ) - ); + transport_frame, _last_tick, next_tick, next_tick_offset, mp ? mp->nframes_this_cycle() : 0)); - if (next_tick_offset >= _midi_port->nframes_this_cycle()) { + if (!mp || (next_tick_offset >= mp->nframes_this_cycle())) { break; } |