[Clam-devel] Strange configure behaviour

Pau Arumí parumi at iua.upf.edu
Sun Apr 20 08:30:47 PDT 2008


On dg, 2008-04-20 at 13:28 +0200, David García Garzón wrote:
> Yes, you are right, but no, it is not a bug. The configuration is run twice. 
> This is because when the network editor adds a processing, the default 
> configuration is applied on the default constructor. Then, the network editor 
> configures it with the proper configuration.

Exactly. The rule is: you can't assume the number of times Configure(..)
-- and hence ConcreteConfigure(..) -- will be called. (It actually
happens 3 times in NetworkEditor but this might change).

We know this is a problem for processings with expensive (in terms of
runtime load) configuration. And the design should be fixed so that
configuration happens only once.
When the configuration is not expensive it should be no problem the
number of times it is being configured.

Pau

> On Dissabte 19 Abril 2008, Francisco Tufró wrote:
> > I'm having a strange behaviour when i insert my processing in the
> > NetworkEditor.
> > It runs the configuration 2 times. (it always did it)
> >
> > I realised of this because i send some output to the console and it appears
> > twice.
> > see the code:
> > .
> > .
> > void DefaultInit(){
> >    AddAll();
> >    UpdateData();
> >    SetMidiDevice(-1);
> >
> >    // Device Listing on Console
> >    for (int i = 0; i < Pm_CountDevices(); i++) {
> >       const PmDeviceInfo *info = Pm_GetDeviceInfo(i);
> >       if (info->input){
> >          printf("%d: %s, %s", i, info->interf, info->name);
> >          printf(" (input)");
> >          printf("\n");
> >        }
> >    }
> > }
> >
> > it works fine, only prints the list one time (i've tested it).
> > but see the output when i insert the module:
> >
> > 0: CoreMIDI, NeON Port 1 (input)
> > 1: CoreMIDI, NeON Port 2 (input)
> > 0: CoreMIDI, NeON Port 1 (input)
> > 1: CoreMIDI, NeON Port 2 (input)
> >
> > the DefaultInit() is executed twice.
> > I don't know if this is a bug, or is like this for any reason, just wanted
> > to notice it.
> >
> > :)
> 
> 
> 
> _______________________________________________
> 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