summaryrefslogtreecommitdiff
path: root/libs/ardour/ticker.cc
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2009-01-01 04:14:50 +0000
committerHans Baier <hansfbaier@googlemail.com>2009-01-01 04:14:50 +0000
commit2e61c9c034a768286e98c5baffdaed9b3931fc81 (patch)
tree8d8bd11fa2e78931fd4bad2f125cfd00c4bcf983 /libs/ardour/ticker.cc
parentcc677d5c87265d6af7adc73d386a74511fee28cb (diff)
* fix broken MidiClockTicker (introduced by revision 4361)
* fix missing -DWITH_JACK_MIDI in SConstruct when using JACK MIDI git-svn-id: svn://localhost/ardour2/branches/3.0@4364 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ticker.cc')
-rw-r--r--libs/ardour/ticker.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/ardour/ticker.cc b/libs/ardour/ticker.cc
index 46e21a66de..0012d47abf 100644
--- a/libs/ardour/ticker.cc
+++ b/libs/ardour/ticker.cc
@@ -108,7 +108,7 @@ void MidiClockTicker::transport_looped()
assert(loop_location);
#if DEBUG_TICKER
- cerr << "Transport looped, position:" << p_session->transport_frame()
+ cerr << "Transport looped, position:" << _session->transport_frame()
<< " loop start " << loop_location->start( )
<< " loop end " << loop_location->end( )
<< " play loop " << _session->get_play_loop()
@@ -127,8 +127,9 @@ void MidiClockTicker::tick(const nframes_t& transport_frames, const BBT_Time& tr
if (!Config->get_send_midi_clock() || _session == 0 || _session->transport_speed() != 1.0f)
return;
- MIDI::Jack_MidiPort & jack_port (dynamic_cast<MIDI::Jack_MidiPort &> (*_midi_port));
-
+ MIDI::JACK_MidiPort* jack_port = dynamic_cast<MIDI::JACK_MidiPort*>(_midi_port);
+ assert(jack_port);
+
while (true) {
double next_tick = _last_tick + one_ppqn_in_frames(transport_frames);
nframes_t next_tick_offset = nframes_t(next_tick) - transport_frames;
@@ -138,11 +139,11 @@ void MidiClockTicker::tick(const nframes_t& transport_frames, const BBT_Time& tr
<< ":Last tick time:" << _last_tick << ":"
<< ":Next tick time:" << next_tick << ":"
<< "Offset:" << next_tick_offset << ":"
- << "cycle length:" << jack_port.nframes_this_cycle()
+ << "cycle length:" << jack_port->nframes_this_cycle()
<< endl;
#endif
- if (next_tick_offset >= jack_port.nframes_this_cycle())
+ if (next_tick_offset >= jack_port->nframes_this_cycle())
return;
send_midi_clock_event(next_tick_offset);