Don't display empty tabs in the port matrix.
[ardour.git] / libs / ardour / jack_slave.cc
index a06e295a099f1a2ed734f6d28ebf1f956d1e36f8..9ef6eb8579ed21897a0ad7822846cd2c12e8e02a 100644 (file)
@@ -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
 */
 
 #include <iostream>
+#include <cerrno>
 
-#include <errno.h>
 #include <jack/jack.h>
 #include <jack/transport.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;
-       nframes_t p;
+       double x;
+       nframes64_t p;
        /* call this to initialize things */
        speed_and_position (x, p);
 }
@@ -44,6 +44,12 @@ JACK_Slave::~JACK_Slave ()
 {
 }
 
+void
+JACK_Slave::reset_client (jack_client_t* j)
+{
+       jack = j;
+}
+
 bool
 JACK_Slave::locked() const
 {
@@ -56,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, nframes64_t& position)
 {
        jack_position_t pos;
        jack_transport_state_t state;
@@ -81,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;