What is a stereo I/O? How is it described, and how do
you index them
when making connections?
its a thing with 2 mono Audio Ports.
So why do we
need Bays and Foos again, and not just
ChannelDescriptors? Simpler is better ...
Well, the problem with addressing Channels 1D is that Channels move
around if you change the number of Channels of a certain kind. So,
you're pretty much forced to reinstantiate the plugin to change the
Channel count.
nono. Plugin provides Channel Descriptors. Host says
newchannel_idx = plug->new_channel(channel_descriptor_idx); The plugin does
not re-order existing channels to group them together. It gives an index to
the host. A 1-dimensional index. The plugin just maps that index onto
whatever it uses internally.
struct
XAP_ctrl_channel_desc {
char *name;
char *label;
unsigned flags;
int n_controls;
XAP_control *controls;
};
struct XAP_io_channel_desc {
char *name;
char *label;
unsigned flags;
int n_ports;
XAP_port *ports;
};
struct XAP_Descriptor {
...
XAP_ctrl_channel_desc *ctrl_channel_descs;
XAP_io_channel_desc *io_channel_descs;
int **channel_compat; /* if (compat[ctrl][io]) */
...
int (*xap_new_channel)(int ctrl_idx, int io_idx);
...
};
Ok... A few questions on this:
* Is a *_channel_desc able to express whether it's an
output or input?
I had envisioned no. I saw I/O channels as being ins and outs in one config
(2ins 2outs, 1in 2out, etc) and ctrl_channels as the same. Each XAP_control
and XAP_descriptor flags whether it is in/out. That could change.
* What is the relation between control and I/O
channels?
Generally 1-1, though not mandatory. The ONLY reason for seperating them is
to allow interchangable IO on a control channel. I'm not even sure that is
needed.
* How would you handle say, ctrl in + one audio in +
two audio out?
1 Control Channel with an array of controls
1 IO Channel with 1 in and 2 outs
The plugin has to indicate that they are compatible.
if (plug->channel_compat(plug, ctrl_idx, io_idx)) {
chan_id = plug->new_channel(plug, ctrl_idx, io_idx);
...
}
Dig?
This allows us to have IO Channels be interchangeable, including data
format, if we REALLY want. Alternatively, we could just have some method of
changing any port (if it supports it) to/from INT/FLOAT.
The simples answer of all, and the one I don't mind is just to have one big
ChannelDesc that identifies the controls, the ins and the outs all together.
No compat matrix, no mis-matches.
Simple