66 |
} |
} |
67 |
|
|
68 |
|
|
69 |
|
// Main application form accessor. |
70 |
|
qsamplerMainForm *qsamplerChannel::mainForm(void) const |
71 |
|
{ |
72 |
|
return m_pMainForm; |
73 |
|
} |
74 |
|
|
75 |
|
|
76 |
// The global options settings delegated property. |
// The global options settings delegated property. |
77 |
qsamplerOptions *qsamplerChannel::options (void) |
qsamplerOptions *qsamplerChannel::options (void) const |
78 |
{ |
{ |
79 |
if (m_pMainForm == NULL) |
if (m_pMainForm == NULL) |
80 |
return NULL; |
return NULL; |
84 |
|
|
85 |
|
|
86 |
// The client descriptor delegated property. |
// The client descriptor delegated property. |
87 |
lscp_client_t *qsamplerChannel::client (void) |
lscp_client_t *qsamplerChannel::client (void) const |
88 |
{ |
{ |
89 |
if (m_pMainForm == NULL) |
if (m_pMainForm == NULL) |
90 |
return NULL; |
return NULL; |
138 |
|
|
139 |
|
|
140 |
// Channel-ID (aka Sammpler-Channel) accessors. |
// Channel-ID (aka Sammpler-Channel) accessors. |
141 |
int qsamplerChannel::channelID (void) |
int qsamplerChannel::channelID (void) const |
142 |
{ |
{ |
143 |
return m_iChannelID; |
return m_iChannelID; |
144 |
} |
} |
150 |
|
|
151 |
|
|
152 |
// Readable channel name. |
// Readable channel name. |
153 |
QString qsamplerChannel::channelName (void) |
QString qsamplerChannel::channelName (void) const |
154 |
{ |
{ |
155 |
return (m_iChannelID < 0 ? QObject::tr("New Channel") : QObject::tr("Channel %1").arg(m_iChannelID)); |
return (m_iChannelID < 0 ? QObject::tr("New Channel") : QObject::tr("Channel %1").arg(m_iChannelID)); |
156 |
} |
} |
157 |
|
|
158 |
|
|
159 |
// Engine name accessors. |
// Engine name accessors. |
160 |
QString& qsamplerChannel::engineName (void) |
const QString& qsamplerChannel::engineName (void) const |
161 |
{ |
{ |
162 |
return m_sEngineName; |
return m_sEngineName; |
163 |
} |
} |
181 |
|
|
182 |
|
|
183 |
// Instrument filename accessor. |
// Instrument filename accessor. |
184 |
QString& qsamplerChannel::instrumentFile (void) |
const QString& qsamplerChannel::instrumentFile (void) const |
185 |
{ |
{ |
186 |
return m_sInstrumentFile; |
return m_sInstrumentFile; |
187 |
} |
} |
188 |
|
|
189 |
// Instrument index accessor. |
// Instrument index accessor. |
190 |
int qsamplerChannel::instrumentNr (void) |
int qsamplerChannel::instrumentNr (void) const |
191 |
{ |
{ |
192 |
return m_iInstrumentNr; |
return m_iInstrumentNr; |
193 |
} |
} |
194 |
|
|
195 |
// Instrument name accessor. |
// Instrument name accessor. |
196 |
QString& qsamplerChannel::instrumentName (void) |
const QString& qsamplerChannel::instrumentName (void) const |
197 |
{ |
{ |
198 |
return m_sInstrumentName; |
return m_sInstrumentName; |
199 |
} |
} |
200 |
|
|
201 |
// Instrument status accessor. |
// Instrument status accessor. |
202 |
int qsamplerChannel::instrumentStatus (void) |
int qsamplerChannel::instrumentStatus (void) const |
203 |
{ |
{ |
204 |
return m_iInstrumentStatus; |
return m_iInstrumentStatus; |
205 |
} |
} |
243 |
|
|
244 |
|
|
245 |
// MIDI driver type accessors (DEPRECATED). |
// MIDI driver type accessors (DEPRECATED). |
246 |
QString& qsamplerChannel::midiDriver (void) |
const QString& qsamplerChannel::midiDriver (void) const |
247 |
{ |
{ |
248 |
return m_sMidiDriver; |
return m_sMidiDriver; |
249 |
} |
} |
268 |
|
|
269 |
|
|
270 |
// MIDI device accessors. |
// MIDI device accessors. |
271 |
int qsamplerChannel::midiDevice (void) |
int qsamplerChannel::midiDevice (void) const |
272 |
{ |
{ |
273 |
return m_iMidiDevice; |
return m_iMidiDevice; |
274 |
} |
} |
293 |
|
|
294 |
|
|
295 |
// MIDI port number accessor. |
// MIDI port number accessor. |
296 |
int qsamplerChannel::midiPort (void) |
int qsamplerChannel::midiPort (void) const |
297 |
{ |
{ |
298 |
return m_iMidiPort; |
return m_iMidiPort; |
299 |
} |
} |
318 |
|
|
319 |
|
|
320 |
// MIDI channel accessor. |
// MIDI channel accessor. |
321 |
int qsamplerChannel::midiChannel (void) |
int qsamplerChannel::midiChannel (void) const |
322 |
{ |
{ |
323 |
return m_iMidiChannel; |
return m_iMidiChannel; |
324 |
} |
} |
343 |
|
|
344 |
|
|
345 |
// Audio device accessor. |
// Audio device accessor. |
346 |
int qsamplerChannel::audioDevice (void) |
int qsamplerChannel::audioDevice (void) const |
347 |
{ |
{ |
348 |
return m_iAudioDevice; |
return m_iAudioDevice; |
349 |
} |
} |
368 |
|
|
369 |
|
|
370 |
// Audio driver type accessors (DEPRECATED). |
// Audio driver type accessors (DEPRECATED). |
371 |
QString& qsamplerChannel::audioDriver (void) |
const QString& qsamplerChannel::audioDriver (void) const |
372 |
{ |
{ |
373 |
return m_sAudioDriver; |
return m_sAudioDriver; |
374 |
} |
} |
393 |
|
|
394 |
|
|
395 |
// Channel volume accessors. |
// Channel volume accessors. |
396 |
float qsamplerChannel::volume (void) |
float qsamplerChannel::volume (void) const |
397 |
{ |
{ |
398 |
return m_fVolume; |
return m_fVolume; |
399 |
} |
} |
533 |
|
|
534 |
|
|
535 |
// Redirected messages output methods. |
// Redirected messages output methods. |
536 |
void qsamplerChannel::appendMessages( const QString& s ) |
void qsamplerChannel::appendMessages( const QString& s ) const |
537 |
{ |
{ |
538 |
if (m_pMainForm) |
if (m_pMainForm) |
539 |
m_pMainForm->appendMessages(channelName() + ' ' + s); |
m_pMainForm->appendMessages(channelName() + ' ' + s); |
540 |
} |
} |
541 |
|
|
542 |
void qsamplerChannel::appendMessagesColor( const QString& s, const QString& c ) |
void qsamplerChannel::appendMessagesColor( const QString& s, |
543 |
|
const QString& c ) const |
544 |
{ |
{ |
545 |
if (m_pMainForm) |
if (m_pMainForm) |
546 |
m_pMainForm->appendMessagesColor(channelName() + ' ' + s, c); |
m_pMainForm->appendMessagesColor(channelName() + ' ' + s, c); |
547 |
} |
} |
548 |
|
|
549 |
void qsamplerChannel::appendMessagesText( const QString& s ) |
void qsamplerChannel::appendMessagesText( const QString& s ) const |
550 |
{ |
{ |
551 |
if (m_pMainForm) |
if (m_pMainForm) |
552 |
m_pMainForm->appendMessagesText(channelName() + ' ' + s); |
m_pMainForm->appendMessagesText(channelName() + ' ' + s); |
553 |
} |
} |
554 |
|
|
555 |
void qsamplerChannel::appendMessagesError( const QString& s ) |
void qsamplerChannel::appendMessagesError( const QString& s ) const |
556 |
{ |
{ |
557 |
if (m_pMainForm) |
if (m_pMainForm) |
558 |
m_pMainForm->appendMessagesError(channelName() + "\n\n" + s); |
m_pMainForm->appendMessagesError(channelName() + "\n\n" + s); |
559 |
} |
} |
560 |
|
|
561 |
void qsamplerChannel::appendMessagesClient( const QString& s ) |
void qsamplerChannel::appendMessagesClient( const QString& s ) const |
562 |
{ |
{ |
563 |
if (m_pMainForm) |
if (m_pMainForm) |
564 |
m_pMainForm->appendMessagesClient(channelName() + ' ' + s); |
m_pMainForm->appendMessagesClient(channelName() + ' ' + s); |