clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 295db37324c7f3568b94eb53541cda0f68268102
parent 3070f2db1f0f2ec09466e4fa9706f5370b4b853a
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date:   Tue,  6 Jan 2015 21:41:10 +0100

Update and improve tools and examples

Diffstat:
Mexamples/thyns/thyns.h | 6+++---
Mexamples/thyns/voice.h | 2+-
Mtools/clap-info/clap-info.c | 5+++--
Mtools/clap-jack-host/clap-jack-host.c | 4++--
4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/examples/thyns/thyns.h b/examples/thyns/thyns.h @@ -92,9 +92,9 @@ thyns_note_on(struct thyns *thyns, thyns_dlist_push_back(thyns->singing, voice); thyns->keys[key] = voice; voice->key = key; - thyns_voice_params_init(voice, &thyns->params); } + thyns_voice_params_init(voice, &thyns->params); thyns_voice_start_note(thyns->keys[key], key, pitch); } @@ -154,8 +154,8 @@ thyns_process(struct thyns *thyns, struct clap_process *process) } // process - process->output[0][i] = thyns_step(thyns, process); - process->output[1][i] = process->output[0][i]; + process->outputs[0][i] = thyns_step(thyns, process); + process->outputs[1][i] = process->outputs[0][i]; } // ensure no more events are left diff --git a/examples/thyns/voice.h b/examples/thyns/voice.h @@ -74,7 +74,7 @@ thyns_voice_params_init(struct thyns_voice *voice, // osc2 for (int i = 0; i < THYNS_OSC_PARAM_COUNT; ++i) - voice->osc1.values[i] = params->values + off + i; + voice->osc2.values[i] = params->values + off + i; off += THYNS_OSC_PARAM_COUNT; } diff --git a/tools/clap-info/clap-info.c b/tools/clap-info/clap-info.c @@ -63,9 +63,10 @@ int main(int argc, char **argv) #define print_attr(Attr) \ do { \ - plugin->get_attribute( \ + int size = plugin->get_attribute( \ plugin, CLAP_ATTR_##Attr, buffer, sizeof (buffer)); \ - fprintf(stdout, " %s: %s\n", CLAP_ATTR_##Attr, buffer); \ + if (size > 0) \ + fprintf(stdout, " %s: %s\n", CLAP_ATTR_##Attr, buffer); \ } while (0) print_attr(ID); diff --git a/tools/clap-jack-host/clap-jack-host.c b/tools/clap-jack-host/clap-jack-host.c @@ -84,8 +84,8 @@ int process(jack_nframes_t nframes, void *arg) uint32_t midi_in_count = jack_midi_get_event_count(midi_in_buf); struct clap_process p; - p.input = in; - p.output = out; + p.inputs = in; + p.outputs = out; p.samples_count = nframes; p.steady_time = app->steady_time; // XXX add time info