diff options
author | David Robillard <d@drobilla.net> | 2012-08-29 20:20:17 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-29 20:20:17 +0000 |
commit | ab5a0fbb947729ef7fade2449912fb70a075d8d3 (patch) | |
tree | fa5cb6b1a2cf81ae1526c51e58feeaff8275335d | |
parent | ca76acd952dfd2716eac32902df9973b8292c681 (diff) | |
download | jalv-ab5a0fbb947729ef7fade2449912fb70a075d8d3.tar.gz jalv-ab5a0fbb947729ef7fade2449912fb70a075d8d3.tar.bz2 jalv-ab5a0fbb947729ef7fade2449912fb70a075d8d3.zip |
Update for latest options extension.
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@4761 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/jalv.c | 29 |
1 files changed, 13 insertions, 16 deletions
@@ -935,6 +935,7 @@ main(int argc, char** argv) jalv.midi_buf_size = 4096; fprintf(stderr, "warning: No jack_port_type_get_buffer_size.\n"); #endif + printf("Block length: %u frames\n", jalv.block_length); printf("MIDI buffers: %zu bytes\n", jalv.midi_buf_size); if (jalv.opts.buffer_size == 0) { @@ -947,22 +948,18 @@ main(int argc, char** argv) jalv.opts.buffer_size = jalv.midi_buf_size * 4; } - printf("Block length: %u frames\n", jalv.block_length); - /* Initialize options to pass to plugin */ - const LV2_Atom_Float sample_rate_option = - { { sizeof(float), jalv.urids.atom_Float }, jalv.sample_rate }; - const LV2_Atom_Int min_length_option = - { { sizeof(float), jalv.urids.atom_Int }, jalv.block_length }; - const LV2_Atom_Int max_length_option = - { { sizeof(float), jalv.urids.atom_Int }, jalv.block_length }; - const LV2_Atom_Int seq_size_option = - { { sizeof(float), jalv.urids.atom_Int }, jalv.midi_buf_size }; - LV2_Options_Option options[] = { - { jalv.urids.param_sampleRate, &sample_rate_option.atom }, - { jalv.urids.bufsz_minBlockLength, &min_length_option.atom }, - { jalv.urids.bufsz_maxBlockLength, &max_length_option.atom }, - { jalv.urids.bufsz_sequenceSize, &seq_size_option.atom }, - { 0, NULL } }; + /* Build options array to pass to plugin */ + const LV2_Options_Option options[] = { + { jalv.urids.param_sampleRate, sizeof(float), jalv.urids.atom_Float, + &jalv.sample_rate }, + { jalv.urids.bufsz_minBlockLength, sizeof(int32_t), jalv.urids.atom_Int, + &jalv.block_length }, + { jalv.urids.bufsz_maxBlockLength, sizeof(int32_t), jalv.urids.atom_Int, + &jalv.block_length }, + { jalv.urids.bufsz_sequenceSize, sizeof(int32_t), jalv.urids.atom_Int, + &jalv.midi_buf_size }, + { 0, 0, 0, NULL } + }; options_feature.data = &options; |