Subject: [linux-audio-dev] re: laaga, round 2
From: Kai Vehmanen (kaiv_AT_wakkanet.fi)
Date: Thu May 10 2001 - 21:55:46 EEST
On Thu, 10 May 2001, Paul Davis wrote:
>> the channels (that is, if the api is the same regardless of the
>> underlying channel type) why should the plugin be given the
>> information?
> A plugin has a UI. The user says "I want to connect the output of this
> internal object to physical channel #1". The plugin does:
[...]
> channel_id_t chn = hardware_id (1);
> request_channel (chn, PLAYBACK);
> ... store chn in the internal object ...
Now is this really needed? I agree with Karl that it's not necessary to
export channel type information to plugins. So let's say plugin wants
four output channels:
int channels[4];
for(int n=0; n < 4; n++)
channels[n] = request_channel (PLAYBACK);
... now the plugin GUI presents these 4 channels to user. They can be
called "ch-1", ..., "ch-4". The real channel ids are stored in the
'channels' array. The LAAGA server could for instance return channel
indexes of 4,40,400,1000 ... ie. not necessarily starting from 0 or
1, nor a increasing sequence of consecutive integers.
But in most cases those numbers are anything but random. The server also
has a GUI. There the user can select which plugins are loaded, and also,
which channels are assigned to plugins. If the server allows multiple
inputs/outputs per channel, it can let the user assign multiple plugins to
the same channel range.
So in the server GUI, user can specify:
- load a mono sw synth to channel 1
- load a stereo drum machine to channels 2-3
- channels 4-16 are populated by _native_
diskstreamer routines (ie. _not_ LAAGA clients,
but still use the same physical buffers)
- load a variable channel mixer GUI to channels
1-16 ...
When server instantiates the plugins:
- for sw-synth 'request_channel(PLAYBACK)' returns 1
- similarly for other plugins
- the variable channel mixer GUI requests 16ch
input and 16 output channells; when it tries to
request the 17th channels, the request_channel()
call will fail (server doesn't have more channels
available)
- all the GUIs are launched
After the GUIs are running:
- each plugin sees only those channels it has
managed to reserve from the server
- user has specified how the channels are given
to the plugins, so this should not confuse her
We press start:
- we've have a pretty damn cool audio system at
our use! :D
-- http://www.eca.cx Audio software for Linux!
This archive was generated by hypermail 2b28 : Thu May 10 2001 - 21:42:30 EEST