* fix broken MidiClockTicker (introduced by revision 4361)
authorHans Baier <hansfbaier@googlemail.com>
Thu, 1 Jan 2009 04:14:50 +0000 (04:14 +0000)
committerHans Baier <hansfbaier@googlemail.com>
Thu, 1 Jan 2009 04:14:50 +0000 (04:14 +0000)
* 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

SConstruct
gtk2_ardour/ardour.menus.in
libs/ardour/ticker.cc

index 8174a9171ae7c485ac0fd6085a7bbbbe44e315c7..e603a0e305f892168d241b6127db874cd1923a81 100644 (file)
@@ -1064,6 +1064,7 @@ if conf.CheckCHeader('jack/midiport.h'):
     env['SYSMIDI'] = 'JACK MIDI'
     subst_dict['%MIDITAG%'] = "control"
     subst_dict['%MIDITYPE%'] = "jack"
+    env.Append(CCFLAGS=" -DWITH_JACK_MIDI")
     print "Using JACK MIDI"
 elif conf.CheckCHeader('alsa/asoundlib.h'):
     libraries['sysmidi'] = LibraryInfo (LIBS='asound')
index 03df627bbc61cdcbc78f239b67584af825961643..c6688e92a2acf2d6beb316748103e038c662bfe7 100644 (file)
                             <menuitem action='SendMTC'/>
                             <menuitem action='SendMMC'/>
                             <menuitem action='UseMMC'/>
+                            <menuitem action='SendMidiClock'/>
               </menu>
               <menu action="TempoMenu">
                      <menuitem action='set-tempo-from-region'/>
index 46e21a66de94d160c214c2d650caed1f67a4153c..0012d47abfc3f60c9c2598b03f58aa9a5d52e3b3 100644 (file)
@@ -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);