Notification messages are not send when there isn't network activity between the
LinuxSampler and its clients. The messages are delayed until the presence of
such. This mostly affects the instrument loading when the client doesn't poll
the sampler channel information on a regular basis.
The attached patch for lscpserver.cpp causes LinuxSampler to checks at least 10
times in a second for new event messages.
Created attachment 13 [details]
patch for lscpserver.cpp
I'm not sure anymore, but I think we had an issue with the timeout argument of
select() and removed it from this section of the LSCP server due to this. But
we can give it a try and see if somebody faces a problem. So go ahead and
commit it please!
OK, I found the old implementation in the CVS:
Yes, there is an issue there (from `man select'):
"On Linux, the function select modifies timeout
to reflect the amount of time not slept; most
other implementations do not do this.
This causes problems both when Linux code which reads
timeout is ported to other operating systems,
and when code is ported to Linux that reuses a
struct timeval for multiple selects in a loop
without reinitializing it. Consider timeout to
be undefined after select returns."
In those implementation after the first invocation of select
the timeout is set to 0, and than we have an endless loop, I think...
Is there probably an autoconf check for this implementation difference? I don't
think we should simply use "#if LINUX" or something.
I think that it's ok now (for all platforms) because, now, the timout variable
is set before every call to select function, so the select implementation in
this case doesn't matter. This wasn't done in the old(removed) implementation.