aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jalv.c18
-rw-r--r--wscript2
2 files changed, 12 insertions, 8 deletions
diff --git a/src/jalv.c b/src/jalv.c
index 2609290..2bcf74e 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -318,7 +318,7 @@ jack_buffer_size_cb(jack_nframes_t nframes, void* data)
Jalv* const jalv = (Jalv*)data;
jalv->block_length = nframes;
jalv->buf_size_set = true;
-#ifdef jack_port_type_get_buffer_size
+#ifdef HAVE_JACK_PORT_TYPE_GET_BUFFER_SIZE
jalv->midi_buf_size = jack_port_type_get_buffer_size(
jalv->jack_client, JACK_DEFAULT_MIDI_TYPE);
#endif
@@ -726,8 +726,7 @@ jalv_get_sample_count(LV2_Buf_Size_Access_Handle handle,
uint32_t* power_of)
{
Jalv* jalv = (Jalv*)handle;
- // TODO: Is this actually guaranteed with Jack2?
- *min = jalv->block_length;
+ *min = jalv->block_length; // FIXME: Not guaranteed by Jack API
*max = jalv->block_length;
*multiple_of = 1;
*power_of = 0;
@@ -739,17 +738,22 @@ jalv_get_sample_count(LV2_Buf_Size_Access_Handle handle,
return 0;
}
-static size_t
+static LV2_Buf_Size_Status
jalv_get_buf_size(LV2_Buf_Size_Access_Handle handle,
+ uint32_t* buf_size,
LV2_URID type,
- LV2_URID subtype)
+ uint32_t sample_count)
{
Jalv* jalv = (Jalv*)handle;
if (!jalv->buf_size_set) {
fprintf(stderr, "Buffer size requested but it is not yet known.\n");
- return 0;
}
- return 0;
+ if (type == jalv->forge.Sequence) {
+ *buf_size = jalv->midi_buf_size;
+ return LV2_BUF_SIZE_SUCCESS;
+ }
+ *buf_size = 0;
+ return LV2_BUF_SIZE_ERR_BAD_TYPE;
}
static void
diff --git a/wscript b/wscript
index 4d4fc11..5d56d30 100644
--- a/wscript
+++ b/wscript
@@ -34,7 +34,7 @@ def configure(conf):
else:
conf.env.append_unique('CFLAGS', '-std=c99')
- autowaf.check_pkg(conf, 'lv2', atleast_version='1.0.5', uselib_store='LV2')
+ autowaf.check_pkg(conf, 'lv2', atleast_version='1.0.7', uselib_store='LV2')
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV',
atleast_version='0.14.0', mandatory=True)
autowaf.check_pkg(conf, 'serd-0', uselib_store='SERD',