projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix merge conflicts with audioengine
[ardour.git]
/
libs
/
ardour
/
jack_slave.cc
diff --git
a/libs/ardour/jack_slave.cc
b/libs/ardour/jack_slave.cc
index a06e295a099f1a2ed734f6d28ebf1f956d1e36f8..4b2f3b18609dbfecf176dc808918624de64b2bba 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
@@
-18,24
+18,19
@@
*/
#include <iostream>
*/
#include <iostream>
+#include <cerrno>
-#include <errno.h>
-#include <jack/jack.h>
-#include <jack/transport.h>
-
-#include <ardour/slave.h>
-#include <ardour/session.h>
-
-#include "i18n.h"
+#include "ardour/audioengine.h"
+#include "ardour/slave.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 (
AudioEngine& e
)
+ :
engine (e
)
{
{
-
float
x;
-
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);
}
@@
-56,34
+51,29
@@
JACK_Slave::ok() const
return true;
}
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;
-
- state = jack_transport_query (jack, &pos);
-
- switch (state) {
- case JackTransportStopped:
+ switch (engine.transport_state()) {
+ case TransportStopped:
speed = 0;
_starting = false;
break;
speed = 0;
_starting = false;
break;
- case
Jack
TransportRolling:
+ case TransportRolling:
speed = 1.0;
_starting = false;
break;
speed = 1.0;
_starting = false;
break;
- case
Jack
TransportLooping:
+ case TransportLooping:
speed = 1.0;
_starting = false;
break;
speed = 1.0;
_starting = false;
break;
- case
Jack
TransportStarting:
+ case TransportStarting:
_starting = true;
// don't adjust speed here, just leave it as it was
break;
}
sp = speed;
_starting = true;
// don't adjust speed here, just leave it as it was
break;
}
sp = speed;
- position =
pos.frame
;
+ position =
engine.transport_frame()
;
return true;
}
return true;
}