|
From: Rui N. C. <rn...@rn...> - 2004-06-30 07:48:52
|
Vladimir, > > It looks like the problem you described with CREATE MIDI_INPUT DEVICE > not taking any parameters is twofold. First issue is not C++, it's just > that i forgot to include that syntax in lscp.y :) > It /was/ twofold. The missing syntax was in deed noticed and restored. As of yesterday's, it's already commited. Now it's a purely C++ problem. > > So we can't really set most parameters to anything other than defaults > during device creation time. > Hmm. Regarding the MIDI inpuit ports parameter, I did also tried fixing the default to 1 (one) instead of 0 (zero) -- something done on MidiInputDevice::ParameterPorts::DefaultAsInt(). However, even then, the alsa_seq port don't get actually created, that is, OnSetValue() does not get ever called. Another thing, probably unrelated, is that OnSetValue() only gets called when we set the parameter value as a string, with SetValue(String val) but not with SetValue(int i). Is this intentional? > > I'm thinking that we'll have to make changes to devicefactory so that > Create calls default constructor and then calls some other method that > will set the parameters _after_ the constructors are all done. > I'm thinking devices will have only one constructor and after calling it > factory will interate thru all parameters and set them one by one. That > will make sure that OnSetValue is called and the backend stuff is in the > right state. > I'm pretty convinced it's all due to that constructor vs. virtual methods you're arguing. Go for it! :) Cheers. -- rncbc aka Rui Nuno Capela rn...@rn... |