along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <iostream>
#include <errno.h>
#include <jack/jack.h>
#include <jack/transport.h>
-#include <pbd/error.h>
-#include <ardour/slave.h>
-#include <ardour/session.h>
+#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;
- jack_nframes_t p;
+ double x;
+ nframes_t p;
/* call this to initialize things */
speed_and_position (x, p);
}
{
}
+void
+JACK_Slave::reset_client (jack_client_t* j)
+{
+ jack = j;
+}
+
bool
JACK_Slave::locked() const
{
}
bool
-JACK_Slave::speed_and_position (float& sp, jack_nframes_t& position)
+JACK_Slave::speed_and_position (double& sp, nframes_t& position)
{
jack_position_t pos;
jack_transport_state_t state;
-
state = jack_transport_query (jack, &pos);
switch (state) {
_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;