--- lscpserver.cpp 2005-05-24 19:23:10.000000000 +0000 +++ lscpserver.cpp.new 2005-05-24 18:09:53.000000000 +0000 @@ -601,6 +601,8 @@ //Defaults values String EngineName = "NONE"; float Volume = 0.0f; + int AudioOutputDeviceID; + int MidiInputDeviceID; String InstrumentFileName = "NONE"; String InstrumentName = "NONE"; int InstrumentIndex = -1; @@ -628,11 +630,13 @@ result.Add("VOLUME", Volume); //Some not-so-hardcoded stuff to make GUI look good - result.Add("AUDIO_OUTPUT_DEVICE", GetAudioOutputDeviceIndex(pSamplerChannel->GetAudioOutputDevice())); + AudioOutputDeviceID = GetAudioOutputDeviceIndex(pSamplerChannel->GetAudioOutputDevice()); + result.Add("AUDIO_OUTPUT_DEVICE", AudioOutputDeviceID == -1 ? "NONE" : ToString(AudioOutputDeviceID)); result.Add("AUDIO_OUTPUT_CHANNELS", AudioOutputChannels); result.Add("AUDIO_OUTPUT_ROUTING", AudioRouting); - result.Add("MIDI_INPUT_DEVICE", GetMidiInputDeviceIndex(pSamplerChannel->GetMidiInputDevice())); + MidiInputDeviceID = GetMidiInputDeviceIndex(pSamplerChannel->GetMidiInputDevice()); + result.Add("MIDI_INPUT_DEVICE", MidiInputDeviceID == -1 ? "NONE" : ToString(MidiInputDeviceID)); result.Add("MIDI_INPUT_PORT", pSamplerChannel->GetMidiInputPort()); if (pSamplerChannel->GetMidiInputChannel() == MidiInputPort::midi_chan_all) result.Add("MIDI_INPUT_CHANNEL", "ALL"); else result.Add("MIDI_INPUT_CHANNEL", pSamplerChannel->GetMidiInputChannel());