|
From: Rui N. C. <rn...@rn...> - 2004-06-22 12:15:07
|
Hi,
For your patching pleasure :) you may try and test the attached diff-patch
onto current CVS HEAD, which is my latest attempt on keeping backward
compability with older (pre-June13th) linuxsampler LSCP client interfaces.
The fine print goes like this:
* SET CHANNEL AUDIO_OUTPUT_TYPE <chan> <driver> command is back! :)
I know it's been deprecated, but I think it's too early to break
existing LSCP scripts or clients (e.g. qsampler), preventing them
to work properly with the new and future linuxsampler code. It
creates an audio output device instance of the given driver type
("Jack" or "Alsa") with default parameters if none exists,
otherwise it just picks the first available device and assign it
to the intended sampler channel.
It's basicaly equivalent to the follwing commands in succession:
CREATE AUDIO_OUTPUT_DEVICE <driver>
SET CHANNEL AUDIO_OUTPUT_DEVICE <chan> <devno>
* The AudioOutputDevice class get's a new pure virtual method,
Driver(), which is implemented on both of the existing inherited
classes, AudioOutputDeviceAlsa and AudioOutputDeviceJack, with
the sole purpose to return the driver type name as a String
("Alsa" and "Jack", respectively).
* The quoting on the filename argument for the LOAD INSTRUMENT
command has been made optional; you can have both ways, with
single quotes or none, keeping compability with older LSCP
specification.
* An additional sanity check is made on LOAD INSTRUMENT, whether
the sampler channel has an audio output device assigned, thus
preventing the server from crashing on instrument file load.
* The GET AUDIO_OUTPUT_DEVICE INFO now includes the missing
"driver" item, as predicted by the draft protocol document.
IMPORTANT: As the patch includes small changes on the lex/yacc sources,
you must issue 'make parser' under src/network, before the top level
'make'.
Please notice that these changes will make current linuxsampler CVS
virtally compatible and functional with "older" LSCP scripts and client
interfaces (e.g. qsampler/liblscp). I think it's worth the effort, now
that it's already done ;)
As before, I'm ready to commit this stuff, as soon as there's some
positive feedback. Dictators may speak now...
Take care.
--
rncbc aka Rui Nuno Capela
rn...@rn...
P.S. Vladimir, as you can see now, I was serious about this backward
compability issue, although it may seem that I'm always happy :) In fact,
I'm really happy to suggest these changes, and most certainly, will be
happier if you and everyone else agrees, just because I think, everybody
would be happier too.
Happy patching! :)
|