diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2015-07-01 08:35:42 +0200 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2015-07-01 08:35:42 +0200 |
commit | 302922920e3a2a393ce7897e9f2b098b010fbbdc (patch) | |
tree | 11f987d6d8cdf55a2aee78ac97fba12fba5a82dc /bundle | |
parent | f1f1dd421504f21b79109622dc20c981bd333f6d (diff) | |
download | synthpod-302922920e3a2a393ce7897e9f2b098b010fbbdc.tar.xz |
increase #ports in synthpod_audio/cv_sink/source.
Diffstat (limited to 'bundle')
-rw-r--r-- | bundle/synthpod_audio_sink.c | 27 | ||||
-rw-r--r-- | bundle/synthpod_audio_source.c | 27 | ||||
-rw-r--r-- | bundle/synthpod_bundle.ttl | 100 | ||||
-rw-r--r-- | bundle/synthpod_cv_sink.c | 27 | ||||
-rw-r--r-- | bundle/synthpod_cv_source.c | 27 | ||||
-rw-r--r-- | bundle/synthpod_midi_sink.c | 27 | ||||
-rw-r--r-- | bundle/synthpod_midi_source.c | 27 | ||||
-rw-r--r-- | bundle/synthpod_osc_sink.c | 27 | ||||
-rw-r--r-- | bundle/synthpod_osc_source.c | 27 |
9 files changed, 156 insertions, 160 deletions
diff --git a/bundle/synthpod_audio_sink.c b/bundle/synthpod_audio_sink.c index 6773d3db..023f13a1 100644 --- a/bundle/synthpod_audio_sink.c +++ b/bundle/synthpod_audio_sink.c @@ -27,7 +27,7 @@ typedef struct _plughandle_t plughandle_t; struct _plughandle_t { - float *audio_in; + float *audio_in [4]; }; static LV2_Handle @@ -46,34 +46,23 @@ connect_port(LV2_Handle instance, uint32_t port, void *data) { plughandle_t *handle = instance; - switch(port) - { - case 0: - handle->audio_in = (float *)data; - break; - - default: - break; - } + if(port < 4) + handle->audio_in[port] = (float *)data; } static System_Port_Type query(LV2_Handle instance, uint32_t port) { - switch(port) - { - case 0: - return SYSTEM_PORT_AUDIO; - - default: - return SYSTEM_PORT_NONE; - } + if(port < 4) + return SYSTEM_PORT_AUDIO; + + return SYSTEM_PORT_NONE; } static void activate(LV2_Handle instance) { - //plughandle_t *handle = instance; + plughandle_t *handle = instance; // nothing } diff --git a/bundle/synthpod_audio_source.c b/bundle/synthpod_audio_source.c index 398bd640..950ad680 100644 --- a/bundle/synthpod_audio_source.c +++ b/bundle/synthpod_audio_source.c @@ -27,7 +27,7 @@ typedef struct _plughandle_t plughandle_t; struct _plughandle_t { - const float *audio_out; + const float *audio_out [4]; }; static LV2_Handle @@ -46,34 +46,23 @@ connect_port(LV2_Handle instance, uint32_t port, void *data) { plughandle_t *handle = instance; - switch(port) - { - case 0: - handle->audio_out = (const float *)data; - break; - - default: - break; - } + if(port < 4) + handle->audio_out[port] = (const float *)data; } static System_Port_Type query(LV2_Handle instance, uint32_t port) { - switch(port) - { - case 0: - return SYSTEM_PORT_AUDIO; - - default: - return SYSTEM_PORT_NONE; - } + if(port < 4) + return SYSTEM_PORT_AUDIO; + + return SYSTEM_PORT_NONE; } static void activate(LV2_Handle instance) { - //plughandle_t *handle = instance; + plughandle_t *handle = instance; // nothing } diff --git a/bundle/synthpod_bundle.ttl b/bundle/synthpod_bundle.ttl index 6a954ea8..3c39dc72 100644 --- a/bundle/synthpod_bundle.ttl +++ b/bundle/synthpod_bundle.ttl @@ -314,8 +314,29 @@ synthpod:cv_sink a lv2:InputPort , lv2:CVPort ; lv2:index 0 ; - lv2:symbol "cv_sink" ; - lv2:name "CV Sink" ; + lv2:symbol "cv_sink_1" ; + lv2:name "CV Sink 1" ; + pg:group synthpod:group_sink ; + ] , [ + a lv2:InputPort , + lv2:CVPort ; + lv2:index 1 ; + lv2:symbol "cv_sink_2" ; + lv2:name "CV Sink 2" ; + pg:group synthpod:group_sink ; + ] , [ + a lv2:InputPort , + lv2:CVPort ; + lv2:index 2 ; + lv2:symbol "cv_sink_3" ; + lv2:name "CV Sink 3" ; + pg:group synthpod:group_sink ; + ] , [ + a lv2:InputPort , + lv2:CVPort ; + lv2:index 3 ; + lv2:symbol "cv_sink_4" ; + lv2:name "CV Sink 4" ; pg:group synthpod:group_sink ; ] . # CV Source Plugin @@ -333,8 +354,29 @@ synthpod:cv_source a lv2:OutputPort , lv2:CVPort ; lv2:index 0 ; - lv2:symbol "cv_source" ; - lv2:name "CV Source" ; + lv2:symbol "cv_source_1" ; + lv2:name "CV Source 1" ; + pg:group synthpod:group_source ; + ] , [ + a lv2:OutputPort , + lv2:CVPort ; + lv2:index 1 ; + lv2:symbol "cv_source_2" ; + lv2:name "CV Source 2" ; + pg:group synthpod:group_source ; + ] , [ + a lv2:OutputPort , + lv2:CVPort ; + lv2:index 2 ; + lv2:symbol "cv_source_3" ; + lv2:name "CV Source 3" ; + pg:group synthpod:group_source ; + ] , [ + a lv2:OutputPort , + lv2:CVPort ; + lv2:index 3 ; + lv2:symbol "cv_source_4" ; + lv2:name "CV Source 4" ; pg:group synthpod:group_source ; ] . @@ -353,8 +395,29 @@ synthpod:audio_sink a lv2:InputPort , lv2:AudioPort ; lv2:index 0 ; - lv2:symbol "audio_sink" ; - lv2:name "Audio Sink" ; + lv2:symbol "audio_sink_1" ; + lv2:name "Audio Sink 1" ; + pg:group synthpod:group_sink ; + ] , [ + a lv2:InputPort , + lv2:AudioPort ; + lv2:index 1 ; + lv2:symbol "audio_sink_2" ; + lv2:name "Audio Sink 2" ; + pg:group synthpod:group_sink ; + ] , [ + a lv2:InputPort , + lv2:AudioPort ; + lv2:index 2 ; + lv2:symbol "audio_sink_3" ; + lv2:name "Audio Sink 3" ; + pg:group synthpod:group_sink ; + ] , [ + a lv2:InputPort , + lv2:AudioPort ; + lv2:index 3 ; + lv2:symbol "audio_sink_4" ; + lv2:name "Audio Sink 4" ; pg:group synthpod:group_sink ; ] . # AudioSource Plugin @@ -372,7 +435,28 @@ synthpod:audio_source a lv2:OutputPort , lv2:AudioPort ; lv2:index 0 ; - lv2:symbol "audio_source" ; - lv2:name "Audio Source" ; + lv2:symbol "audio_source_1" ; + lv2:name "Audio Source 1" ; + pg:group synthpod:group_source ; + ] , [ + a lv2:OutputPort , + lv2:AudioPort ; + lv2:index 1 ; + lv2:symbol "audio_source_2" ; + lv2:name "Audio Source 2" ; + pg:group synthpod:group_source ; + ] , [ + a lv2:OutputPort , + lv2:AudioPort ; + lv2:index 2 ; + lv2:symbol "audio_source_3" ; + lv2:name "Audio Source 3" ; + pg:group synthpod:group_source ; + ] , [ + a lv2:OutputPort , + lv2:AudioPort ; + lv2:index 3 ; + lv2:symbol "audio_source_4" ; + lv2:name "Audio Source 4" ; pg:group synthpod:group_source ; ] . diff --git a/bundle/synthpod_cv_sink.c b/bundle/synthpod_cv_sink.c index 0c50e127..edeacdb0 100644 --- a/bundle/synthpod_cv_sink.c +++ b/bundle/synthpod_cv_sink.c @@ -27,7 +27,7 @@ typedef struct _plughandle_t plughandle_t; struct _plughandle_t { - float *cv_in; + float *cv_in [4]; }; static LV2_Handle @@ -46,34 +46,23 @@ connect_port(LV2_Handle instance, uint32_t port, void *data) { plughandle_t *handle = instance; - switch(port) - { - case 0: - handle->cv_in = (float *)data; - break; - - default: - break; - } + if(port < 4) + handle->cv_in[port] = (float *)data; } static System_Port_Type query(LV2_Handle instance, uint32_t port) { - switch(port) - { - case 0: - return SYSTEM_PORT_CV; - - default: - return SYSTEM_PORT_NONE; - } + if(port < 4) + return SYSTEM_PORT_CV; + + return SYSTEM_PORT_NONE; } static void activate(LV2_Handle instance) { - //plughandle_t *handle = instance; + plughandle_t *handle = instance; // nothing } diff --git a/bundle/synthpod_cv_source.c b/bundle/synthpod_cv_source.c index 6a3468c0..d914a230 100644 --- a/bundle/synthpod_cv_source.c +++ b/bundle/synthpod_cv_source.c @@ -27,7 +27,7 @@ typedef struct _plughandle_t plughandle_t; struct _plughandle_t { - const float *cv_out; + const float *cv_out [4]; }; static LV2_Handle @@ -46,34 +46,23 @@ connect_port(LV2_Handle instance, uint32_t port, void *data) { plughandle_t *handle = instance; - switch(port) - { - case 0: - handle->cv_out = (const float *)data; - break; - - default: - break; - } + if(port < 4) + handle->cv_out[port] = (const float *)data; } static System_Port_Type query(LV2_Handle instance, uint32_t port) { - switch(port) - { - case 0: - return SYSTEM_PORT_CV; - - default: - return SYSTEM_PORT_NONE; - } + if(port < 4) + return SYSTEM_PORT_CV; + + return SYSTEM_PORT_NONE; } static void activate(LV2_Handle instance) { - //plughandle_t *handle = instance; + plughandle_t *handle = instance; // nothing } diff --git a/bundle/synthpod_midi_sink.c b/bundle/synthpod_midi_sink.c index f2191f6a..8a1688ee 100644 --- a/bundle/synthpod_midi_sink.c +++ b/bundle/synthpod_midi_sink.c @@ -27,7 +27,7 @@ typedef struct _plughandle_t plughandle_t; struct _plughandle_t { - LV2_Atom_Sequence *event_in; + LV2_Atom_Sequence *event_in [1]; }; static LV2_Handle @@ -46,34 +46,23 @@ connect_port(LV2_Handle instance, uint32_t port, void *data) { plughandle_t *handle = instance; - switch(port) - { - case 0: - handle->event_in = (LV2_Atom_Sequence *)data; - break; - - default: - break; - } + if(port < 1) + handle->event_in[port] = (LV2_Atom_Sequence *)data; } static System_Port_Type query(LV2_Handle instance, uint32_t port) { - switch(port) - { - case 0: - return SYSTEM_PORT_MIDI; - - default: - return SYSTEM_PORT_NONE; - } + if(port < 1) + return SYSTEM_PORT_MIDI; + + return SYSTEM_PORT_NONE; } static void activate(LV2_Handle instance) { - //plughandle_t *handle = instance; + plughandle_t *handle = instance; // nothing } diff --git a/bundle/synthpod_midi_source.c b/bundle/synthpod_midi_source.c index 85330cdb..cab45987 100644 --- a/bundle/synthpod_midi_source.c +++ b/bundle/synthpod_midi_source.c @@ -27,7 +27,7 @@ typedef struct _plughandle_t plughandle_t; struct _plughandle_t { - const LV2_Atom_Sequence *event_out; + const LV2_Atom_Sequence *event_out [1]; }; static LV2_Handle @@ -46,34 +46,23 @@ connect_port(LV2_Handle instance, uint32_t port, void *data) { plughandle_t *handle = instance; - switch(port) - { - case 0: - handle->event_out = (const LV2_Atom_Sequence *)data; - break; - - default: - break; - } + if(port < 1) + handle->event_out[port] = (const LV2_Atom_Sequence *)data; } static System_Port_Type query(LV2_Handle instance, uint32_t port) { - switch(port) - { - case 0: - return SYSTEM_PORT_MIDI; - - default: - return SYSTEM_PORT_NONE; - } + if(port < 1) + return SYSTEM_PORT_MIDI; + + return SYSTEM_PORT_NONE; } static void activate(LV2_Handle instance) { - //plughandle_t *handle = instance; + plughandle_t *handle = instance; // nothing } diff --git a/bundle/synthpod_osc_sink.c b/bundle/synthpod_osc_sink.c index 84dba43e..b98a70fa 100644 --- a/bundle/synthpod_osc_sink.c +++ b/bundle/synthpod_osc_sink.c @@ -27,7 +27,7 @@ typedef struct _plughandle_t plughandle_t; struct _plughandle_t { - LV2_Atom_Sequence *event_in; + LV2_Atom_Sequence *event_in [1]; }; static LV2_Handle @@ -46,34 +46,23 @@ connect_port(LV2_Handle instance, uint32_t port, void *data) { plughandle_t *handle = instance; - switch(port) - { - case 0: - handle->event_in = (LV2_Atom_Sequence *)data; - break; - - default: - break; - } + if(port < 1) + handle->event_in[port] = (LV2_Atom_Sequence *)data; } static System_Port_Type query(LV2_Handle instance, uint32_t port) { - switch(port) - { - case 0: - return SYSTEM_PORT_OSC; - - default: - return SYSTEM_PORT_NONE; - } + if(port < 1) + return SYSTEM_PORT_OSC; + + return SYSTEM_PORT_NONE; } static void activate(LV2_Handle instance) { - //plughandle_t *handle = instance; + plughandle_t *handle = instance; // nothing } diff --git a/bundle/synthpod_osc_source.c b/bundle/synthpod_osc_source.c index 19e290eb..fb1cc44a 100644 --- a/bundle/synthpod_osc_source.c +++ b/bundle/synthpod_osc_source.c @@ -27,7 +27,7 @@ typedef struct _plughandle_t plughandle_t; struct _plughandle_t { - const LV2_Atom_Sequence *event_out; + const LV2_Atom_Sequence *event_out [1]; }; static LV2_Handle @@ -46,34 +46,23 @@ connect_port(LV2_Handle instance, uint32_t port, void *data) { plughandle_t *handle = instance; - switch(port) - { - case 0: - handle->event_out = (const LV2_Atom_Sequence *)data; - break; - - default: - break; - } + if(port < 1) + handle->event_out[port] = (const LV2_Atom_Sequence *)data; } static System_Port_Type query(LV2_Handle instance, uint32_t port) { - switch(port) - { - case 0: - return SYSTEM_PORT_OSC; - - default: - return SYSTEM_PORT_NONE; - } + if(port < 1) + return SYSTEM_PORT_OSC; + + return SYSTEM_PORT_NONE; } static void activate(LV2_Handle instance) { - //plughandle_t *handle = instance; + plughandle_t *handle = instance; // nothing } |