On 9/19/2011 6:08 PM, [email protected] wrote: > fixed crash which can occur at startup when less midi devices are installed > than when prefs were saved. > > The problem was that the midi device is stored in the prefs as an integer. > When the prefs are loaded, the device number is loaded and no checks are > performed causing an array out of bounds exception if you now have less > devices than the device number you had previously configured. > > This also caused a problem that the configured devices could change if you > plugged in or unplugged a usb device that wasn't even used by JSL, as the > correct device would now be in a different position in the array. Given that > USB midi devices are probably a lot more common now than 10 years ago, its > probably quite common now that available devices might vary from session to > session. > > I have changed it so that the midi device is stored as a string (using > vladimir's de-duplicated name). When JSL is re-started, as long as the same > device name exists, it will be configured correctly regardless of where the > device appears in the array.
Actually, I already was planning on doing that in the refactor, so you probably saved me some work. Saving the interfaces by name will be much more reliable. While you're in that zone, consider this. In the refactor, the new MIDI code is going to be able to listen on *all* available input ports at once, so the current MIDI configuration panel (where you select a single input and single output port) is going to need to be altered a bit. I don't know if we want to let the user select which portS they want JSL to listen on, or do we want JSL to just listen to everything available all the time? - Joe ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Jsynthlib-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jsynthlib-devel
