projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move a few declarations to first use.
[ardour.git]
/
libs
/
ardour
/
jack_slave.cc
diff --git
a/libs/ardour/jack_slave.cc
b/libs/ardour/jack_slave.cc
index be8d585aaa9fc832915233befc8fd61adc726a37..116ccdd145566cdf8401c8a0df8a584e074d1692 100644
(file)
--- 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
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,29
+15,27
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <iostream>
*/
#include <iostream>
+#include <cerrno>
-#include <errno.h>
#include <jack/jack.h>
#include <jack/transport.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"
#include "i18n.h"
+using namespace std;
using namespace ARDOUR;
using namespace ARDOUR;
-using namespace sigc;
JACK_Slave::JACK_Slave (jack_client_t* j)
: jack (j)
{
JACK_Slave::JACK_Slave (jack_client_t* j)
: jack (j)
{
-
float
x;
-
jack_nframe
s_t p;
+
double
x;
+
framepo
s_t p;
/* call this to initialize things */
speed_and_position (x, p);
}
/* call this to initialize things */
speed_and_position (x, p);
}
@@
-46,6
+44,12
@@
JACK_Slave::~JACK_Slave ()
{
}
{
}
+void
+JACK_Slave::reset_client (jack_client_t* j)
+{
+ jack = j;
+}
+
bool
JACK_Slave::locked() const
{
bool
JACK_Slave::locked() const
{
@@
-58,8
+62,8
@@
JACK_Slave::ok() const
return true;
}
return true;
}
-bool
-JACK_Slave::speed_and_position (
float& sp, jack_nframes_t& position)
+bool
+JACK_Slave::speed_and_position (
double& sp, framepos_t& position)
{
jack_position_t pos;
jack_transport_state_t state;
{
jack_position_t pos;
jack_transport_state_t state;
@@
-83,6
+87,8
@@
JACK_Slave::speed_and_position (float& sp, jack_nframes_t& position)
_starting = true;
// don't adjust speed here, just leave it as it was
break;
_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;
}
sp = speed;