170 |
} |
} |
171 |
|
|
172 |
|
|
|
// Instrument name accessor. |
|
|
QString& qsamplerChannel::instrumentName (void) |
|
|
{ |
|
|
return m_sInstrumentName; |
|
|
} |
|
|
|
|
173 |
// Instrument filename accessor. |
// Instrument filename accessor. |
174 |
QString& qsamplerChannel::instrumentFile (void) |
QString& qsamplerChannel::instrumentFile (void) |
175 |
{ |
{ |
182 |
return m_iInstrumentNr; |
return m_iInstrumentNr; |
183 |
} |
} |
184 |
|
|
185 |
|
// Instrument name accessor. |
186 |
|
QString& qsamplerChannel::instrumentName (void) |
187 |
|
{ |
188 |
|
return m_sInstrumentName; |
189 |
|
} |
190 |
|
|
191 |
// Instrument status accessor. |
// Instrument status accessor. |
192 |
int qsamplerChannel::instrumentStatus (void) |
int qsamplerChannel::instrumentStatus (void) |
193 |
{ |
{ |
205 |
return false; |
return false; |
206 |
} |
} |
207 |
|
|
|
m_sInstrumentName = getInstrumentName(sInstrumentFile, iInstrumentNr, true); |
|
208 |
m_sInstrumentFile = sInstrumentFile; |
m_sInstrumentFile = sInstrumentFile; |
209 |
m_iInstrumentNr = iInstrumentNr; |
m_iInstrumentNr = iInstrumentNr; |
210 |
|
#ifdef CONFIG_INSTRUMENT_NAME |
211 |
|
m_sInstrumentName = QString::null; // We'll get it later on channel_info... |
212 |
|
#else |
213 |
|
m_sInstrumentName = getInstrumentName(sInstrumentFile, iInstrumentNr, true); |
214 |
|
#endif |
215 |
m_iInstrumentStatus = 0; |
m_iInstrumentStatus = 0; |
216 |
|
|
217 |
return true; |
return true; |
368 |
// Istrument name remapper. |
// Istrument name remapper. |
369 |
void qsamplerChannel::updateInstrumentName (void) |
void qsamplerChannel::updateInstrumentName (void) |
370 |
{ |
{ |
371 |
|
#ifndef CONFIG_INSTRUMENT_NAME |
372 |
m_sInstrumentName = getInstrumentName(m_sInstrumentFile, |
m_sInstrumentName = getInstrumentName(m_sInstrumentFile, |
373 |
m_iInstrumentNr, (options() && options()->bInstrumentNames)); |
m_iInstrumentNr, (options() && options()->bInstrumentNames)); |
374 |
|
#endif |
375 |
} |
} |
376 |
|
|
377 |
|
|
389 |
return false; |
return false; |
390 |
} |
} |
391 |
|
|
392 |
|
#ifdef CONFIG_INSTRUMENT_NAME |
393 |
|
// We got all actual instrument datum... |
394 |
|
m_sInstrumentFile = pChannelInfo->instrument_file; |
395 |
|
m_iInstrumentNr = pChannelInfo->instrument_nr; |
396 |
|
m_sInstrumentName = pChannelInfo->instrument_name; |
397 |
|
#else |
398 |
// First, check if intrument name has changed, |
// First, check if intrument name has changed, |
399 |
// taking care that instrument name lookup might be expensive, |
// taking care that instrument name lookup might be expensive, |
400 |
// so we better make it only once and when really needed... |
// so we better make it only once and when really needed... |
404 |
m_iInstrumentNr = pChannelInfo->instrument_nr; |
m_iInstrumentNr = pChannelInfo->instrument_nr; |
405 |
updateInstrumentName(); |
updateInstrumentName(); |
406 |
} |
} |
407 |
|
#endif |
408 |
// Cache in other channel information. |
// Cache in other channel information. |
409 |
m_sEngineName = pChannelInfo->engine_name; |
m_sEngineName = pChannelInfo->engine_name; |
410 |
m_iInstrumentStatus = pChannelInfo->instrument_status; |
m_iInstrumentStatus = pChannelInfo->instrument_status; |