diff options
-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() |