[Clam-devel] Re: [CLAM] multiple ports

Natanael Olaiz nolaiz at gmail.com
Sat May 16 04:47:55 PDT 2009


El 05/16/2009 01:32 PM, Pau Arumí escribió:
> As Dirk warned, after applying this patch, any old (without applying the
> migration script) network will assert/crash NE with this message:
>
> ##########################################################
> ################### ASSERTION FAILED #####################
> ##########################################################
> At file scons/libs/core/src/OutPortRegistry.cxx line 44
> No out port named 'AudioOut'.
> Try with: '0
>
> Given that Sources and Sinks are pervasive in clam networks (and not all
> of them are in our svn) I think this is quite risky and I suggest to
> take advantage of this change to add some robustness funcionality:
>
> Instad of asserting when a connection is not correct, the network could
> open without that connection and give the user a warning about the
> broken connections. This message alone would suffice for making the user
> aware about how to fix the network.
>   

That would be great!

> Additinonally, the message could suggest the user the command to run to
> update the new networks - or make it runnable (via a button) in this
> message window.
>   
To do it safely, that doesn't require a version number on every processing?


Best regards,
Nael.
> I'd wait for this functionality (NE opens with broken connections)
> before applying the patch.
>
> P
>
>
>
>
> El dv 15 de 05 de 2009 a les 19:44 +0200, en/na Pau Arumi va escriure:
>   
>> Thanks Dirk, I will review and apply the patch. 
>> Let's move (well, continue) the discussion in clam-devel ml, though .
>>
>> P
>>
>> En/na Dirk Griffioen ha escrit:
>>     
>>> Hi All,
>>>
>>> Attached you will find a patch for giving AudioSource and AudioSink 
>>> multiple ports.
>>>
>>> I tested it manually and ran the testsuite (there is a second patch 
>>> for the testsuite).
>>>
>>> There is one caveat: it does not seem possible to retain the old 
>>> naming scheme when loading from a .clamnetwork file where a port has 
>>> the name AudioIn or AudioOut; instead, they're now numbered 
>>> (source/sinkname.number):
>>>
>>> AudioSource.0
>>> AudioSource.1
>>> ... etc
>>>
>>> In the jack connections the dot becomes an underscore (AudioSource_1 
>>> ... etc).
>>>
>>> So the clamnetworks need to be updated - attached you will find an 
>>> commandfile for the clamrefactor.py script.
>>>
>>> The reason for the namechange is that ports are constructed with a 
>>> name which should match with the name in the xml file, but at 
>>> construcion time this name from the xml file is not known. This went 
>>> ok because the code always had 'AudioIn/Out' and this always matched 
>>> with the xml file, as there was but one port and one portname for a 
>>> source or sink.
>>>
>>> An alternative might be to create 'unnamed' ports (add a constructor, 
>>> the default arguments are in the way), add a 'setname' function to the 
>>> port and then call this when the xml is loaded. But it seems to me 
>>> this would add a lot of complexity.
>>>
>>> When there is only 1 port in the source/sink, the jackport is named 
>>> after the source/sink so when you have meaningfull names in your 
>>> clamnetworks, these show in the jack connection viewer.
>>>
>>> I tested it and it looks good, but as I am new to CLAM I might missed 
>>> (obvious) things; so please review.
>>>
>>> Best, Dirk
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> CLAM mailing list
>>> CLAM at iua.upf.es
>>> http://clam.iua.upf.edu
>>>       
>> _______________________________________________
>> CLAM mailing list
>> CLAM at iua.upf.es
>> http://clam.iua.upf.edu
>>     
>
>
> _______________________________________________
> Clam-devel mailing list
> Clam-devel at llistes.projectes.lafarga.org
> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>
>   





More information about the clam-devel mailing list