Re: [linux-audio-dev] LADSPA plugin - non realtime use of buffers

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

Subject: Re: [linux-audio-dev] LADSPA plugin - non realtime use of buffers
From: Steve Harris (S.W.Harris_AT_ecs.soton.ac.uk)
Date: Thu Aug 15 2002 - 12:10:48 EEST


On Wed, Aug 14, 2002 at 10:13:54 -0400, Nathan Stewart wrote:
> How can I truncate the length of the current output buffer without
> closing the whole data stream? Is this what I want to do?

You can't alter the length of the output buffer, you have to produce as
many samples as you consume.

For a simple gate, you should be copying samples from input to output when
its open and writing 0.0f's to the output when its closed.

I used a simple state machine with 4 states: closed, opening, open,
closing. c.f. http://plugin.org.uk/src/gate_1410.xml

The envelope function is a linear segment:
                                      g^
           ___________ a|
          / \ i|
         / \ n|
        / \
_______/ \_________ time-->
closed open open clos closed
       ing ing

Which is obviously wrong, but I haven't to round to fixing it. Applying a
low order, low cutoff lp filter should be enough.

- Steve


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

This archive was generated by hypermail 2b28 : Thu Aug 15 2002 - 12:11:35 EEST