mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 15:15:41 +01:00
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
1 changed files with 17 additions and 8 deletions
|
|
@ -22,6 +22,11 @@
|
|||
#include "ardour/session.h"
|
||||
#include "ardour/tempo.h"
|
||||
|
||||
#ifdef DEBUG_MIDI_CLOCK
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
namespace ARDOUR
|
||||
{
|
||||
|
||||
|
|
@ -30,7 +35,7 @@ void Ticker::set_session(Session& s)
|
|||
{
|
||||
_session = &s;
|
||||
|
||||
if(_session) {
|
||||
if (_session) {
|
||||
_session->tick.connect(mem_fun (*this, &Ticker::tick));
|
||||
_session->GoingAway.connect(mem_fun (*this, &Ticker::going_away));
|
||||
}
|
||||
|
|
@ -40,11 +45,15 @@ void MidiClockTicker::set_session(Session& s)
|
|||
{
|
||||
Ticker::set_session(s);
|
||||
|
||||
if(_session) {
|
||||
_session->MIDIClock_PortChanged.connect(mem_fun (*this, &MidiClockTicker::update_midi_clock_port));
|
||||
_session->TransportStateChange .connect(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));
|
||||
if (_session) {
|
||||
_session->MIDIClock_PortChanged.connect(
|
||||
mem_fun (*this, &MidiClockTicker::update_midi_clock_port));
|
||||
_session->TransportStateChange.connect(
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -61,8 +70,8 @@ void MidiClockTicker::transport_state_changed()
|
|||
return;
|
||||
}
|
||||
|
||||
float speed = _session->transport_speed();
|
||||
nframes_t position = _session->transport_frame();
|
||||
float speed = _session->transport_speed();
|
||||
nframes_t position = _session->transport_frame();
|
||||
#ifdef DEBUG_MIDI_CLOCK
|
||||
cerr << "Transport state change, speed:" << speed << "position:" << position<< " play loop " << _session->get_play_loop() << endl;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue