|
From: Vladimir S. <ha...@so...> - 2004-07-03 20:53:59
|
Hi All, I've checked some stuff in a few minutes ago. Changes include: multiple connection support and event subsctiption support. I left the tokenizer/parser largely intact for now. LSCPServer remains singlethreaded and i think it will be sufficient for what we use it for. The only issue is that execution of a command could take a long time (for example, loading an instrument) but i think we have already established that the client will not like that and we will have things of that nature done in the background anyway. As far as events go i've added the infrastructure but i have not made all the changes to the code everywhere to actually start sending events (yet). I've provided a quick sample on how this could be done by sending a MISCELLANEOUS (debugging) event when a new client connection is established and when an existing connection is terminated. This is just an example for how to use those "guts" and we should be able to add actual event sending very easily. I've spent most of the energy in trying to not block any thread that is originating a notification even LSCPServer thread is busy. I've added Trylock() support to Mutex class to be able to do that. If we need to in the future we'll be able to create new event types in real time. I've left some hooks for that in case we need to do that. Please check it out and let me know where the bugs are. I haven't done much testing on it yet, but i've got a long weekend ahead so i hope i'll do some later (after i make check more stuff in). My plans for this weekend are: 1) Refactor the factories :) a little bit to avoid issues with constructors and parameters (as discussed previously) 2) Look at the audio device/audio channel stuff. (card parameters, mixing channels, etc) 3) Maybe look at converting the MacOS MIDI drivers. 4) Testing, playing with the GUI, updating the spec (if there is enough time). Let me know what you think. Plans will be altered depending on feedback received. Regards, Vladimir. |