X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fjack_slave.cc;h=116ccdd145566cdf8401c8a0df8a584e074d1692;hb=c3821a78162fe6d89455ab5ed4e925bafec2a845;hp=2e03b2f45df68fc78f752d1158a638a0c152f58b;hpb=fedf3d34f32264ac57c6a222b678dc90f2bb1a88;p=ardour.git diff --git a/libs/ardour/jack_slave.cc b/libs/ardour/jack_slave.cc index 2e03b2f45d..116ccdd145 100644 --- a/libs/ardour/jack_slave.cc +++ b/libs/ardour/jack_slave.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2004 Paul Davis + Copyright (C) 2004 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,28 +15,27 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #include +#include -#include #include #include -#include -#include +#include "ardour/slave.h" +#include "ardour/session.h" #include "i18n.h" +using namespace std; using namespace ARDOUR; -using namespace sigc; JACK_Slave::JACK_Slave (jack_client_t* j) : jack (j) { - float x; - nframes_t p; + double x; + framepos_t p; /* call this to initialize things */ speed_and_position (x, p); } @@ -45,6 +44,12 @@ JACK_Slave::~JACK_Slave () { } +void +JACK_Slave::reset_client (jack_client_t* j) +{ + jack = j; +} + bool JACK_Slave::locked() const { @@ -57,8 +62,8 @@ JACK_Slave::ok() const return true; } -bool -JACK_Slave::speed_and_position (float& sp, nframes_t& position) +bool +JACK_Slave::speed_and_position (double& sp, framepos_t& position) { jack_position_t pos; jack_transport_state_t state; @@ -82,6 +87,8 @@ JACK_Slave::speed_and_position (float& sp, nframes_t& position) _starting = true; // don't adjust speed here, just leave it as it was break; + default: + cerr << "WARNING: Unknown JACK transport state: " << state << endl; } sp = speed;