Hi everybody,<br><br>I've been thinking a bit about how to let the host decide how many channels a plugin should handle.<br>Currently I'm only considering mono / stereo but of course future expandability is important.<br>
<br>Reading around, the port-groups extension seems designed to describe the audio I/O formats.<br>Setting the port group type could be done using the Options interface.<br><br>We'd need to make an extension like "instance-port-configuration" (but a better shorter name)<br>
#define PLUGIN_PORT_CONFIGURATION "<a href="http://lv2plug.in/ns/ext/pluginPortConfiguration">http://lv2plug.in/ns/ext/pluginPortConfiguration</a>"<br><br>What I'd imagine the "running order" of a host wanting to set up a stereo plugin (an supports options):<br>
-plugin is tagged with opts:requiredOption pluginPortConfiguration:atSetup<br>-plugin lists pg:monoGroup and pg:stereoGroup as understood types.<br>-host passes "options" LV2_Feature to plugin,<br>-plugin iters over the provided "options" and finds one with the Key field set to URID mapped PLUGIN_PORT_CONFIGURATION<br>
<br>Plugin interprets "option":<br>-context LV2_OPTIONS_INSTANCE, so ignores subject<br>-subject 0<br>-key URID mapped PLUGIN_PORT_CONFIGURATION, (how this option was identified as the configure option by plugin)<br>
-size 0<br>-type URID mapped pg:stereoGroup.<br>-value pointer 0<br><br>Issues I've not resolved / don't know how to deal with:<br>-the plugin must change the amount of ports that it connects, dynamic manifest? Its  supported by very few hosts.. <br>
-always expose the max channel count the plugin can process (say 5.1: 6 channels) but only process the ones as per the pg:stereoGroup?<br><br><br>This is my first attempt at getting designing LV2 extension, so I'm sure theres some inconsistencies with the accepted formatting of extensions..<br>
I'm intrested to hear what others think of the design here, am I missing out something?<br>Cheers, -Harry<br>