Re: [ecasound] LV2 Plugin Support

From: Jeremy Salwen <jeremysalwen@email-addr-hidden>
Date: Thu Oct 06 2011 - 06:02:50 EEST

Also, LV2 plugins require you to connect all ports. However, in some cases
ecasound doesn't connect later ports if it runs out of room. It will just
print the message "WARNING: chain has less channels than plugin has input
ports ". I'd like to instead connect the port to a dummy buffer that it
just ignores, but I'm not sure how to do that. Essentially I'd need to
ensure that the buffer I connect to is always big enough for the output.
However, it seems that the buffer sizes are dynamic... so I don't know how
to verify I've allocated a buffer big enough.

Second, it seems that the LADSPA plugins connect directly to the plugin
buffers... but if the buffers are at all resizable, then resizing them must
reallocate them, so that would mean the pointer stored in the LADSPA plugin
would become stale. Is my assumption that the buffer size might change
after a plugin is instantiated false then?

Jeremy

On Wed, Oct 5, 2011 at 10:50 PM, Jeremy Salwen <jeremysalwen@email-addr-hiddenwrote:

> Alright, so with some preliminary debugging it is now listing LV2 plugins.
> I'm now working on getting the plugins to actually work.
>
> I'm again confused by LADSPA code I copied... I think it's part of the
> bug... look at:
>
> int inport = 0;
> int outport = 0;
> for(unsigned long m = 0; m < port_count_rep; m++) {
> if ((plugin_desc->PortDescriptors[m] & LADSPA_PORT_AUDIO) ==
> LADSPA_PORT_AUDIO) {
> if ((plugin_desc->PortDescriptors[m] & LADSPA_PORT_INPUT) ==
> LADSPA_PORT_INPUT) {
> if (inport < channels())
> plugin_desc->connect_port(plugins_rep[0], m,
> buffer_repp->buffer[inport]);
> ++inport;
> }
> else {
> if (outport < channels())
> plugin_desc->connect_port(plugins_rep[0], m,
> buffer_repp->buffer[outport]);
> ++outport;
> }
> }
> }
>
>
> This seems wrong to me. If you think about it, you will be connecting
> input ports and output ports to the same buffers. (Oh, and on top of that,
> the buffer_repp.buffer documentation says that it shouldn't be accessed
> directly at all (or at least without locking some lock that doesn't seem to
> be done here)). What's going on? It seems like broken code. Is this code
> never executed in the LADSPA plugin host?
>
> Jeremy
>
> On Wed, Oct 5, 2011 at 2:24 PM, Jeremy Salwen <jeremysalwen@email-addr-hiddenwrote:
>
>> Hmm, so fiddling around with random things, I suddenly find
>> ladspa-register working for me from the git branch. I will upload the
>> missing LV2 files and begin testing immediately.
>>
>> Jeremy
>>
>> On Tue, Oct 4, 2011 at 9:35 PM, S. Massy <lists@email-addr-hidden> wrote:
>>
>>> Hello,
>>>
>>> The git tree compiles fine, well master does. With LADSPA_PATH
>>> undefined, I see the same behaviour you described, with it set, it works
>>> fine.
>>>
>>> BTW, the LV2 branch won't compile, due to the absence of audiofx_lv2.h.
>>>
>>> Cheers,
>>> S.M.
>>>
>>>
>>> On Tue, Oct 04, 2011 at 03:18:31PM -0400, Jeremy Salwen wrote:
>>> > I have tried using the master git branch. It does not work even if I
>>> > install it to /usr. That is precisely my problem, that prebuilt
>>> binaries
>>> > work, but If I compile myself, it doesn't.
>>> >
>>> > On Tue, Oct 4, 2011 at 6:50 AM, Julien Claassen <julien@email-addr-hidden>
>>> wrote:
>>> >
>>> > > Hello Jeremy!
>>> > > Unfortunately I can't post to the list at the moment, I have to
>>> subscribe
>>> > > withmy new address. :-(
>>> > > I had an idea about the ladspa problem. I'm not sure, if your self
>>> > > compiled Ecasound sees the correct LADSPA path, so maybe it just
>>> looks in
>>> > > /usr/lib/ladspa and not in /usr/local/lib/ladspa. I think I once had
>>> that
>>> > > problem. Does ti work if you compile Ecasound's master branch
>>> yourself?
>>> > > Warm regards
>>> > > Julien
>>> > > P.S.: Perhaps you could mirror this post to the Ecasound list for the
>>> > > moment. I'm rather in a hurry, but tonight I shall go and fix it.
>>> > >
>>> > >
>>> > > =-=-=-=-=-=-=-=-=-=-=-=-
>>> > > Such Is Life: Very Intensely Adorable;
>>> > > Frightening Absence Just Arriving, Reigns Disappeared, Ornate -
>>> flowers!
>>> > >
>>> > > ====== Find my music at ======
>>> > > http://juliencoder.de/nama/music.html
>>> > > .....................................
>>> > > "If you live to be 100, I hope I live to be 100 minus 1 day,
>>> > > so I never have to live without you." (Winnie the Pooh)
>>> > >
>>>
>>> --
>>>
>>
>>
>

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1

_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Thu Oct 6 08:15:02 2011

This archive was generated by hypermail 2.1.8 : Thu Oct 06 2011 - 08:15:02 EEST