LSCP response format
Posted: Fri Apr 11, 2008 9:59 am
Hi all,
I'm currently working on a small integration of Linuxsampler in the jOrgan project:
For easier setup the program will be able to send LSCP scripts to a running Linuxsampler (these LSCP scripts can easily be created with JSampler).
This works great!
Now I'd like to display error messages to the user about possible problems in the LSCP script. So the result of each command sent to Linuxsampler is scanned for an ERR or WRN prefix.
Regretfully a single-line or multi-line result is not distinguishable without knowing the result format of a command:
C: "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS"
S: "2"
C: "GET AUDIO_OUTPUT_DRIVER INFO ALSA"
S: "DESCRIPTION: Advanced Linux Sound Architecture"
"VERSION: 1.0"
"PARAMETERS: DRIVER,CHANNELS,SAMPLERATE,ACTIVE,FRAGMENTS, FRAGMENTSIZE,CARD"
"."
Without knowing wether a command returns a single-line or multi-line result jOrgan cannot consume the whole result sent back from Linuxsampler without potentially blocking .
Did someone else run into this problem? Is this something where LSCP could be improved?
Thanks
Sven
I'm currently working on a small integration of Linuxsampler in the jOrgan project:
For easier setup the program will be able to send LSCP scripts to a running Linuxsampler (these LSCP scripts can easily be created with JSampler).
This works great!
Now I'd like to display error messages to the user about possible problems in the LSCP script. So the result of each command sent to Linuxsampler is scanned for an ERR or WRN prefix.
Regretfully a single-line or multi-line result is not distinguishable without knowing the result format of a command:
C: "GET AVAILABLE_AUDIO_OUTPUT_DRIVERS"
S: "2"
C: "GET AUDIO_OUTPUT_DRIVER INFO ALSA"
S: "DESCRIPTION: Advanced Linux Sound Architecture"
"VERSION: 1.0"
"PARAMETERS: DRIVER,CHANNELS,SAMPLERATE,ACTIVE,FRAGMENTS, FRAGMENTSIZE,CARD"
"."
Without knowing wether a command returns a single-line or multi-line result jOrgan cannot consume the whole result sent back from Linuxsampler without potentially blocking .
Did someone else run into this problem? Is this something where LSCP could be improved?
Thanks
Sven