205 |
SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel); |
SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel); |
206 |
if (!pSamplerChannel) throw LinuxSamplerException("Index out of bounds"); |
if (!pSamplerChannel) throw LinuxSamplerException("Index out of bounds"); |
207 |
Engine* pEngine = pSamplerChannel->GetEngine(); |
Engine* pEngine = pSamplerChannel->GetEngine(); |
208 |
|
|
209 |
|
//Defaults values |
210 |
|
String EngineName = "NONE"; |
211 |
|
float Volume = 0; |
212 |
|
String InstrumentFileName = "NONE"; |
213 |
|
int InstrumentIndex = 0; |
214 |
|
|
215 |
if (pEngine) { |
if (pEngine) { |
216 |
result.Add("ENGINE_NAME", pEngine->EngineName()); |
EngineName = pEngine->EngineName(); |
217 |
result.Add("VOLUME", pEngine->Volume()); |
Volume = pEngine->Volume(); |
218 |
|
int iIdx = pEngine->InstrumentIndex(); |
219 |
|
if (iIdx != -1) { |
220 |
|
InstrumentFileName = pEngine->InstrumentFileName(); |
221 |
|
InstrumentIndex = iIdx; |
222 |
|
} |
223 |
} |
} |
224 |
|
|
225 |
|
result.Add("ENGINE_NAME", EngineName); |
226 |
|
result.Add("VOLUME", Volume); |
227 |
|
|
228 |
//Some hardcoded stuff for now to make GUI look good |
//Some hardcoded stuff for now to make GUI look good |
229 |
result.Add("AUDIO_OUTPUT_DEVICE", "0"); |
result.Add("AUDIO_OUTPUT_DEVICE", "0"); |
230 |
result.Add("AUDIO_OUTPUT_CHANNELS", "2"); |
result.Add("AUDIO_OUTPUT_CHANNELS", "2"); |
231 |
result.Add("AUDIO_OUTPUT_ROUTING", "0,1"); |
result.Add("AUDIO_OUTPUT_ROUTING", "0,1"); |
232 |
|
|
233 |
if (pEngine) { |
result.Add("INSTRUMENT_FILE", InstrumentFileName); |
234 |
int iIdx = pEngine->InstrumentIndex(); |
result.Add("INSTRUMENT_NR", InstrumentIndex); |
235 |
if (iIdx != -1) { |
|
236 |
result.Add("INSTRUMENT_FILE", pEngine->InstrumentFileName()); |
//Some more hardcoded stuff for now to make GUI look good |
|
result.Add("INSTRUMENT_NR", iIdx); |
|
|
} |
|
|
} |
|
|
//Some hardcoded stuff for now to make GUI look good |
|
237 |
result.Add("MIDI_INPUT_DEVICE", "0"); |
result.Add("MIDI_INPUT_DEVICE", "0"); |
238 |
result.Add("MIDI_INPUT_PORT", "0"); |
result.Add("MIDI_INPUT_PORT", "0"); |
239 |
result.Add("MIDI_INPUT_CHANNEL", "1"); |
result.Add("MIDI_INPUT_CHANNEL", "1"); |