From 84906b5777d6748c09dd5ca56169aa3366d13c71 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 2 Jan 2007 02:51:41 +0000 Subject: Initial work on dynamic (Jack) buffer resizing (still unworking). git-svn-id: http://svn.drobilla.net/lad/ingen@229 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/JackAudioDriver.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/libs/engine/JackAudioDriver.cpp') diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp index 81f15a78..082afe5a 100644 --- a/src/libs/engine/JackAudioDriver.cpp +++ b/src/libs/engine/JackAudioDriver.cpp @@ -302,8 +302,8 @@ JackAudioDriver::_process_cb(jack_nframes_t nframes) } // Run root patch - assert(_root_patch != NULL); - _root_patch->process(nframes, start_of_current_cycle, start_of_current_cycle + nframes); + if (_root_patch) + _root_patch->process(nframes, start_of_current_cycle, start_of_current_cycle + nframes); return 0; } @@ -333,10 +333,8 @@ JackAudioDriver::_sample_rate_cb(jack_nframes_t nframes) int JackAudioDriver::_buffer_size_cb(jack_nframes_t nframes) { - if (_is_activated) { - cerr << "[JackAudioDriver] On-the-fly buffer size changing not supported (yet). Aborting." << endl; - exit(EXIT_FAILURE); - } else { + if (_root_patch) { + _root_patch->set_buffer_size(nframes); _buffer_size = nframes; } return 0; -- cgit v1.2.1