diff options
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/Engine.cpp | 4 | ||||
-rw-r--r-- | src/engine/JackAudioDriver.cpp | 18 |
2 files changed, 8 insertions, 14 deletions
diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp index eb9e2aa8..b5cbfdb4 100644 --- a/src/engine/Engine.cpp +++ b/src/engine/Engine.cpp @@ -234,13 +234,13 @@ Engine::deactivate() if ((*i)->as_node() != NULL && (*i)->as_node()->parent() == NULL) (*i)->as_node()->deactivate();*/ + _audio_driver->deactivate(); + if (_midi_driver != NULL) { _midi_driver->deactivate(); delete _midi_driver; _midi_driver = NULL; } - - _audio_driver->deactivate(); _audio_driver->root_patch()->deactivate(); diff --git a/src/engine/JackAudioDriver.cpp b/src/engine/JackAudioDriver.cpp index 23577e33..3f39f363 100644 --- a/src/engine/JackAudioDriver.cpp +++ b/src/engine/JackAudioDriver.cpp @@ -185,18 +185,11 @@ void JackAudioDriver::deactivate() { if (_is_activated) { - - //for (Raul::List<JackAudioPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i) - // jack_port_unregister(_client, (*i)->jack_port()); - - jack_deactivate(_client); _is_activated = false; - + jack_deactivate(_client); + _jack_thread->stop(); _ports.clear(); - cout << "[JackAudioDriver] Deactivated Jack client." << endl; - - //_engine.post_processor()->stop(); } } @@ -327,14 +320,15 @@ JackAudioDriver::_process_cb(jack_nframes_t nframes) (*i)->prepare_buffer(nframes); } - assert(_engine.midi_driver()); - _engine.midi_driver()->pre_process(_process_context); + if (_engine.midi_driver()) + _engine.midi_driver()->pre_process(_process_context); // Run root patch if (_root_patch) _root_patch->process(_process_context); - _engine.midi_driver()->post_process(_process_context); + if (_engine.midi_driver()) + _engine.midi_driver()->post_process(_process_context); _engine.post_processor()->set_end_time(_process_context.end()); |