|
From: Rui N. C. <rn...@rn...> - 2004-06-29 09:54:34
|
Hi Vladimir,
(New patch attached)
>
> I'm not sure why you couldn't see alsa ports created. I've tried
> this last night several times and it was working ok.
> Try this:
> CREATE MIDI_INPUT_DEVICE Alsa
> OK[0]
> SET MIDI_INPUT_DEVICE_PARAMETER 0 ports=1
>
Aha. I was trying just that but with the single command line:
CREATE MIDI_INPUT_DEVICE Alsa ports=1
It does not create the alsa_seq port. But yours do. Isn't those supposed
to be equivalent?
OTOH, can you shed me some light on how can it be done internally in C++?
I'm not found in discovering it by trial-and-error :). OK. I've been
trying this:
std::map<String,String> params;
params["ports"] = "1";
pDevice = pSampler->CreateMidiInputDevice("Alsa", params);
This does not create the intended alsa_seq port. In analogy to the above,
the following does work:
std::map<String,String> params;
pDevice = pSampler->CreateMidiInputDevice("Alsa", params);
std::map<String,DeviceCreationParameter*> params2 =
pDevice->DeviceParameters();
params2["ports"]->SetValue("1");
So I think there's a lil'bug on device creation parameterization. Can't
find why yet, as I'm still overpuzzled with this new parameter monster :)
>
> So AcquirePorts is called when the "ports" parameter is set. I've
> discussed it with Christian and although not yet documented (spec needs
> updating) ports are supposed to be created and removed similarly to audio
> channels via the above SET command.
>
Yes I know that. But it seems that the parameter doesn't get properly set
on MidiInputDevice creation time.
Or is it just me?
On attachment is an updated patch, just with the "hack" above, which
applies specifically for the SET CHANNEL MIDI_INPUT_TYPE command
re-implementation, while creating an ALSA MIDI input device with at least
one actual alsa_seq port.
With this, our legacy client(s) will be happy again :)
Cheers.
--
rncbc aka Rui Nuno Capela
rn...@rn...
P.S. Don't forget to do a "make parse" under "src/network", after applying
the patch, as it changes the lscp.y source.
|