Sound output on LADSPA (was Re: [linux-audio-dev] LADSPA GUI Issues (not just GUI, really ;))

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

Subject: Sound output on LADSPA (was Re: [linux-audio-dev] LADSPA GUI Issues (not just GUI, really ;))
From: Jarno Seppanen (jams_AT_cs.tut.fi)
Date: Tue Mar 14 2000 - 18:34:56 EST


No GUIs here :-)

Alexander Konig <alex_AT_rhlx01.fht-esslingen.de> writes:

> But now for the other thing I wanted to ask: Let's say we have something
> like a LADSPA-OSS-output plugin. How should that behave? My concern is
> on locking /dev/dsp for example. I see 3 ways this could be handled:
>
> 1 - with the current design the plugin would have to open /dev/dsp in
> instantiate() and closing would be done in cleanup() then. This would
> result in a blocked /dev/dsp (with oss drivers) while there is a plugin
> instance - no matter whether the host actually plays audio or not.

I would still, although once bombed down, suggest the addition of two
functions to the LADSPA plugin lifecycle: a pre-execute() and a post-execute()
function. These functions would lock and unlock /dev/dsp.

This would make the plugin lifecycle as suggested before: "ctor-init-
run-run-...-finish-init-run-run-...-finish-dtor". Please read below for an
example.

> Now before this results in OSS discussion: I guess there are some other
> important resources that should be blocked by a plugin only when it's
> actually busy - but just like with the value range I can't think of an
> example right now - any suggestions, Kai? ;)

I have another example: suppose you have a recursive filter plugin (not so
hard to imagine :-). Thus the filter will have an internal state. (This
example works equally well for a delay line plugin, as a delay line is a
recursive filter.)

Now every time you restart the DSP processing, the filter needs to clear its
internal state in order to prevent unwanted noises. In the current LADSPA API
this is not supported. You would have to cleanup and re-instantiate.

LADSPA suggestion: so if it is intended to be able to stop and then restart
DSP processing (without unwanted pops), there must be at least the pre-execute
function added. I would also add post-execute for symmetry.

Just my few eurocents!

-- 
-Jarno


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

This archive was generated by hypermail 2b28 : Wed Mar 15 2000 - 02:07:26 EST