diff options
author | David Robillard <d@drobilla.net> | 2007-02-24 02:48:12 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-02-24 02:48:12 +0000 |
commit | 72a91851b2d33e76937702579ef8c3efb9825aa9 (patch) | |
tree | 8532d3a3fb7e958da61f0cabdea52d4a0805018f | |
parent | b3d241d408b3f07f16ee8cef0a2a36078f9a95eb (diff) | |
download | raul-72a91851b2d33e76937702579ef8c3efb9825aa9.tar.gz raul-72a91851b2d33e76937702579ef8c3efb9825aa9.tar.bz2 raul-72a91851b2d33e76937702579ef8c3efb9825aa9.zip |
Split JackDriver 'attaching' and 'activating' to give derived classes a chance to set things up in overloaded attach methods before the process callback starts firing.
Switch RDF syntax to RDF/XML (temporarily, until raptor 1.1.14 hits distros).
git-svn-id: http://svn.drobilla.net/lad/raul@333 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | raul/JackDriver.h | 3 | ||||
-rw-r--r-- | src/JackDriver.cpp | 35 | ||||
-rw-r--r-- | src/RDFWriter.cpp | 4 |
3 files changed, 30 insertions, 12 deletions
diff --git a/raul/JackDriver.h b/raul/JackDriver.h index 17d7d4c..8ec2572 100644 --- a/raul/JackDriver.h +++ b/raul/JackDriver.h @@ -42,6 +42,9 @@ public: void attach(const string& client_name, string server_name=""); void detach(); + void activate(); + void deactivate(); + bool is_attached() const { return (_client != NULL); } bool is_realtime() const { return _client && jack_is_realtime(_client); } diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index cededca..486f076 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -78,16 +78,7 @@ JackDriver::attach(const string& client_name, string server_name) //_is_dirty = true; _buffer_size = jack_get_buffer_size(_client); - - if (!jack_activate(_client)) { - _is_activated = true; - //signal_attached.emit(); - //_app->status_message("[JACK] Attached"); - } else { - //_app->status_message("[JACK] ERROR: Failed to attach"); - _is_activated = false; } - } } @@ -95,7 +86,7 @@ void JackDriver::detach() { if (_client) { - jack_deactivate(_client); + deactivate(); jack_client_close(_client); _client = NULL; _is_activated = false; @@ -105,6 +96,30 @@ JackDriver::detach() void +JackDriver::activate() +{ + if (!jack_activate(_client)) { + _is_activated = true; + //signal_attached.emit(); + //_app->status_message("[JACK] Attached"); + } else { + //_app->status_message("[JACK] ERROR: Failed to attach"); + _is_activated = false; + } +} + + +void +JackDriver::deactivate() +{ + if (_client) + jack_deactivate(_client); + + _is_activated = false; +} + + +void JackDriver::jack_port_registration_cb(jack_port_id_t /*port_id*/, int /*registered*/, void* /*jack_driver*/) { /* whatever. */ diff --git a/src/RDFWriter.cpp b/src/RDFWriter.cpp index 33bc220..f2d5626 100644 --- a/src/RDFWriter.cpp +++ b/src/RDFWriter.cpp @@ -26,8 +26,8 @@ using namespace std; namespace Raul { -//static const char* const RDF_LANG = "rdfxml-abbrev"; -static const char* const RDF_LANG = "turtle"; +static const char* const RDF_LANG = "rdfxml-abbrev"; +//static const char* const RDF_LANG = "turtle"; RDFWriter::RDFWriter() |