[linux-audio-dev] XAP again - channels, etc.

Tim Hockin thockin at hockin.org
Thu Mar 20 19:49:00 UTC 2003


I fear we've all been very busy.  I know I have.  I have not had time to
devote to XAP, though I have certainly not lost interest.

So today I start looking at my evolving spec doc again.  The biggest chunk
of undecidedness lies in the area of Channels.  We never really resolved the
Bays/Channels etc debate.  We just put it off.  Here it is.

I'd like to propose the following - it is simple and flexible.  Not too
confusing.

Plugins define 'Modules'.  Every plugin has a master Module, and 0-n extra
Modules.  The host can instantiate Modules as needed.  A Module is analogous
to a MIDI Channel in a synth (maybe Module is the wrong word).  It is
analogous to a slot in a mixer.

struct XAP_descriptor {
	...

	/* master module descriptor */
	XAP_module master;

	/* other channel descriptors */
	int n_modules;
	XAP_module *modules;

	/*
	 * Instantiate a module, return a plugin-unique
	 * id/index for it - it's 'Channel'.
	 */
	int (*add_module)(void *plugin, int module);

	/*
	 * Remove a module.
	 */
	int (*del_module)(void *plugin, int index);
};

struct XAP_module {
	char *label;
	char *name;
	uint32_t flags;

	/* how many instances of this module are allowed? */
	int count_max;

	/* per-module controls and I/O */
	int n_controls;
	XAP_control **controls;
	int n_ports;
	XAP_port **ports;
};



More information about the Linux-audio-dev mailing list