|
From: Rui N. C. <rn...@rn...> - 2004-06-16 16:21:40
|
Hi, Myself wrote: > > I'm sure, for the time being, we can fool things up on the server and, > upon receiving a LOAD INSTRUMENT command, the server will do: > > 1) Check for file validity, by checking for it's existence and naively > verify if it's of one of the supported formats (gig, dls or whatever). > > 2) If yes, send the "OK" response immediately to the client, and set the > progress status variable to "0" (zero percent). Otherwise an error status > value will be set (e.g. "ERR"). > > 3) Load the instrument file as it would do normally, as is. > > 4) Right after the load completes, just update the status variable with > a succesful "OK", or "ERR" otherwise. Let's face it, the error status may > hold the actual final response to the LOAD INSTRUMENT command, as it was > until now. > > The value stored on this server channel status variable is exactly the > one that will be held on the INSTRUMENT_STATUS field of the GET > CHANNEL_INFO command. Clear? > > Honestly, I think this isn't that hard to do on the server side. The > actual progress threading and probable libgig changes can be just left to > when Christians get back. Until then, everybody will be happier, me and > qsampler :) > Not hard at all ;) As a proof-of-concept, on attachment to this post, you may find a diff-patch to the linuxsampler_0_2_0_cvs20040613 tarball on ls.org, corresponding to the source tree just before the latest CVS revolution. Maybe it's applicable to current CVS HEAD too, however I didn't tested it yet myself. Specifically, this patch makes the LOAD INSTRUMENT command to return immediately, almost/always with an "OK" response, while spawning the proper instrument file loading in the background. The new INSTRUMENT_STATUS item from GET CHANNEL INFO inquiry command is where one checks for a successfull load. The instrument status value holds the load progress percentage if positive, currently only "0" and "100" ;) Otherwise, in case of a load exception error, the instrument status variable will hold a negative value. As proposed, the instrument file load is considered successful and complete when and only when INSTRUMENT_STATUS holds a "100" value. > If all this is OK, I can make the changes myself to the draft document. > Yet again, it will bump to v.09. The summary preview of changes are: > > 4.4.1 LOAD INSTRUMENT slight semantics change; > 4.4.9 GET CHANNEL INFO response new status field, INSTRUMENT_STATUS; > 6.6 INSTRUMENT_LOADING event type simply vanishes away. > Just hoping this patch gets tested and reviewed, and ultimately found applicable, I'll start making the document changes in no time. Hope to hear from you. Cheers. -- rncbc aka Rui Nuno Capela rn...@rn... |