Fix compilation with -DDEBUG_MIDI_CLOCK
git-svn-id: svn://localhost/ardour2/branches/3.0@5851 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4b01242df1
commit
24035e24e8
@ -22,6 +22,11 @@
|
|||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "ardour/tempo.h"
|
#include "ardour/tempo.h"
|
||||||
|
|
||||||
|
#ifdef DEBUG_MIDI_CLOCK
|
||||||
|
#include <iostream>
|
||||||
|
using namespace std;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ARDOUR
|
namespace ARDOUR
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -30,7 +35,7 @@ void Ticker::set_session(Session& s)
|
|||||||
{
|
{
|
||||||
_session = &s;
|
_session = &s;
|
||||||
|
|
||||||
if(_session) {
|
if (_session) {
|
||||||
_session->tick.connect(mem_fun (*this, &Ticker::tick));
|
_session->tick.connect(mem_fun (*this, &Ticker::tick));
|
||||||
_session->GoingAway.connect(mem_fun (*this, &Ticker::going_away));
|
_session->GoingAway.connect(mem_fun (*this, &Ticker::going_away));
|
||||||
}
|
}
|
||||||
@ -40,11 +45,15 @@ void MidiClockTicker::set_session(Session& s)
|
|||||||
{
|
{
|
||||||
Ticker::set_session(s);
|
Ticker::set_session(s);
|
||||||
|
|
||||||
if(_session) {
|
if (_session) {
|
||||||
_session->MIDIClock_PortChanged.connect(mem_fun (*this, &MidiClockTicker::update_midi_clock_port));
|
_session->MIDIClock_PortChanged.connect(
|
||||||
_session->TransportStateChange .connect(mem_fun (*this, &MidiClockTicker::transport_state_changed));
|
mem_fun (*this, &MidiClockTicker::update_midi_clock_port));
|
||||||
_session->PositionChanged .connect(mem_fun (*this, &MidiClockTicker::position_changed));
|
_session->TransportStateChange.connect(
|
||||||
_session->TransportLooped .connect(mem_fun (*this, &MidiClockTicker::transport_looped));
|
mem_fun (*this, &MidiClockTicker::transport_state_changed));
|
||||||
|
_session->PositionChanged.connect(
|
||||||
|
mem_fun (*this, &MidiClockTicker::position_changed));
|
||||||
|
_session->TransportLooped.connect(
|
||||||
|
mem_fun (*this, &MidiClockTicker::transport_looped));
|
||||||
update_midi_clock_port();
|
update_midi_clock_port();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,8 +70,8 @@ void MidiClockTicker::transport_state_changed()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
float speed = _session->transport_speed();
|
float speed = _session->transport_speed();
|
||||||
nframes_t position = _session->transport_frame();
|
nframes_t position = _session->transport_frame();
|
||||||
#ifdef DEBUG_MIDI_CLOCK
|
#ifdef DEBUG_MIDI_CLOCK
|
||||||
cerr << "Transport state change, speed:" << speed << "position:" << position<< " play loop " << _session->get_play_loop() << endl;
|
cerr << "Transport state change, speed:" << speed << "position:" << position<< " play loop " << _session->get_play_loop() << endl;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user