summaryrefslogtreecommitdiffstats
path: root/src/JackDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-10-17 07:39:42 +0000
committerDavid Robillard <d@drobilla.net>2006-10-17 07:39:42 +0000
commit50dadd7684f90d3f7c6c982f4a63f2d0c09f296a (patch)
tree94d490a7f53dd1386486873f306eb1cb1b12cd28 /src/JackDriver.cpp
parent0a02a5a7b832312f98fcfd2f606eee162725398b (diff)
downloadpatchage-50dadd7684f90d3f7c6c982f4a63f2d0c09f296a.tar.gz
patchage-50dadd7684f90d3f7c6c982f4a63f2d0c09f296a.tar.bz2
patchage-50dadd7684f90d3f7c6c982f4a63f2d0c09f296a.zip
Preliminary Jack transport control.
git-svn-id: http://svn.drobilla.net/lad/patchage@187 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/JackDriver.cpp')
-rw-r--r--src/JackDriver.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp
index eef6b2f..9bc837d 100644
--- a/src/JackDriver.cpp
+++ b/src/JackDriver.cpp
@@ -35,6 +35,8 @@ JackDriver::JackDriver(Patchage* app)
: m_app(app),
m_client(NULL)
{
+ m_last_pos.frame = 0;
+ m_last_pos.valid = (jack_position_bits_t)0;
}
@@ -53,11 +55,14 @@ JackDriver::attach(bool launch_daemon)
if (m_client)
return;
+ jack_set_error_function(error_cb);
+
jack_options_t options = (!launch_daemon) ? JackNoStartServer : JackNullOption;
m_client = jack_client_open("Patchage", options, NULL);
if (m_client == NULL) {
m_app->status_message("[JACK] Unable to attach");
} else {
+ jack_set_error_function(error_cb);
jack_on_shutdown(m_client, jack_shutdown_cb, this);
jack_set_port_registration_callback(m_client, jack_port_registration_cb, this);
jack_set_graph_order_callback(m_client, jack_graph_order_cb, this);
@@ -312,6 +317,12 @@ JackDriver::disconnect(boost::shared_ptr<PatchagePort> const src_port, boost::sh
void
+JackDriver::update_time()
+{
+}
+
+
+void
JackDriver::jack_port_registration_cb(jack_port_id_t port_id, int /*registered*/, void* jack_driver)
{
assert(jack_driver);
@@ -364,3 +375,10 @@ JackDriver::jack_shutdown_cb(void* jack_driver)
}
+void
+JackDriver::error_cb(const char* msg)
+{
+ cerr << "JACK ERROR: " << msg << endl;
+}
+
+