diff options
author | David Robillard <d@drobilla.net> | 2012-01-10 18:01:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-01-10 18:01:10 +0000 |
commit | 3e28bd747843c220eb621007bbe60fa77f1cb607 (patch) | |
tree | 0a38e792e6d442a943892065a57acd6c88f8ab90 | |
parent | fb4e8c4c1ca671efa82a3bdbbc063895522fb71a (diff) | |
download | jalv-3e28bd747843c220eb621007bbe60fa77f1cb607.tar.gz jalv-3e28bd747843c220eb621007bbe60fa77f1cb607.tar.bz2 jalv-3e28bd747843c220eb621007bbe60fa77f1cb607.zip |
Fix compilation on old Jack without jack_port_type_get_buffer_size (fix ticket #801).
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3932 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/jalv.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -297,8 +297,10 @@ jack_buffer_size_cb(jack_nframes_t nframes, void* data) { Jalv* const host = (Jalv*)data; host->buf_size_set = true; +#ifdef jack_port_type_get_buffer_size host->midi_buf_size = jack_port_type_get_buffer_size( host->jack_client, JACK_DEFAULT_MIDI_TYPE); +#endif jalv_allocate_port_buffers(host); return 0; } @@ -696,8 +698,14 @@ main(int argc, char** argv) if (!host.jack_client) die("Failed to connect to JACK.\n"); +#ifdef jack_port_type_get_buffer_size host.midi_buf_size = jack_port_type_get_buffer_size( host.jack_client, JACK_DEFAULT_MIDI_TYPE); +#else + host.midi_buf_size = 4096; + fprintf(stderr, "warning: Old JACK, using default MIDI buffer size %zu\n", + host.midi_buf_size); +#endif /* Instantiate the plugin */ host.instance = lilv_plugin_instantiate( |