[linux-audio-dev] extending LADSPA

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] extending LADSPA
From: douglas irving repetto (douglas_AT_music.columbia.edu)
Date: Tue Oct 24 2000 - 18:02:07 EEST


thanks to everyone for your responses to my questions. i think i
understand LADSPA a little better now, and i also understand the
frustration that comes with trying to work out a spec with a large group
of people. LADSPA is great, and i appreciate the work that has gone into
it!

so i'll stop whining and make a proposal. it seems that the simplest way
to extend the API is to add hints. i'm specifically interested in
knowing how many frames (samples/channels) a user has selected, or how
many frames the host will be passing to me alltogether to process. so:

#define LADSPA_HINT_NUM_FRAMES 0x40

#define LADSPA_IS_HINT_NUM_FRAMES(x) ((x) &
LADSPA_HINT_NUM_FRAMES)

a plugin would also set the LADSPA_HINT_BOUNDED_ABOVE bit.

the host could then either

1) prime the num_frames control input with the correct number of frames
(and maybe even not display this control input to the user???)
2) set the num_frames control input to -1, indicating that "number of
frames" isn't meaningful
3) ignore the hint, which would maintain compatibility with existing
hosts, and simply treat the num_frames control input like any other
control input

hosts that do 3) would essentiall do what has to be done now, which is
leave it up to the user to enter the number of frames to be processed by
hand. while the user might enter a value that doesn't match the actual
selection length, the plugin would have to deal with this sensibly. i.e.
if the user enters 1000 and the plugin is doing a fadeout to 0.0, it
will fade over 1000 frames. but if the plugin then continues recieving
buffers to process it could just keep the gain multiplier at 0.0.

is this more-or-less how one would go about extending the API?

douglas


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Oct 24 2000 - 18:48:32 EEST