diff options
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/JackDriver.cpp | 10 | ||||
-rw-r--r-- | src/engine/JackDriver.hpp | 1 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/engine/JackDriver.cpp b/src/engine/JackDriver.cpp index d83c319f..5b1342cf 100644 --- a/src/engine/JackDriver.cpp +++ b/src/engine/JackDriver.cpp @@ -197,7 +197,6 @@ JackDriver::JackDriver(Engine& engine) , _block_length(0) , _sample_rate(0) , _is_activated(false) - , _local_client(true) , _process_context(engine) , _root_patch(NULL) { @@ -210,7 +209,7 @@ JackDriver::~JackDriver() { deactivate(); - if (_local_client) + if (_client) jack_client_close(_client); } @@ -266,8 +265,6 @@ JackDriver::attach(const std::string& server_name, _client = (jack_client_t*)jack_client; } - _local_client = (jack_client == NULL); - _block_length = jack_get_buffer_size(_client); _sample_rate = jack_get_sample_rate(_client); @@ -323,9 +320,8 @@ JackDriver::deactivate() for (Raul::List<JackPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i) (*i)->destroy(); - jack_deactivate(_client); - - if (_local_client) { + if (_client) { + jack_deactivate(_client); jack_client_close(_client); _client = NULL; } diff --git a/src/engine/JackDriver.hpp b/src/engine/JackDriver.hpp index b10efad1..278a5477 100644 --- a/src/engine/JackDriver.hpp +++ b/src/engine/JackDriver.hpp @@ -173,7 +173,6 @@ private: jack_nframes_t _sample_rate; uint32_t _midi_event_type; bool _is_activated; - bool _local_client; ///< Whether _client should be closed on destruction jack_position_t _position; jack_transport_state_t _transport_state; Raul::List<JackPort*> _ports; |