218 |
// Some child forms are to be created right now. |
// Some child forms are to be created right now. |
219 |
m_pMessages = new qsamplerMessages(this); |
m_pMessages = new qsamplerMessages(this); |
220 |
m_pDeviceForm = new qsamplerDeviceForm(this, 0, wflags); |
m_pDeviceForm = new qsamplerDeviceForm(this, 0, wflags); |
221 |
|
m_pDeviceForm->setMainForm(this); // An important life immutable! |
222 |
// Set message defaults... |
// Set message defaults... |
223 |
updateMessagesFont(); |
updateMessagesFont(); |
224 |
updateMessagesLimit(); |
updateMessagesLimit(); |
667 |
piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Audio); |
piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Audio); |
668 |
for (iDevice = 0; piDeviceIDs && piDeviceIDs[iDevice] >= 0; iDevice++) { |
for (iDevice = 0; piDeviceIDs && piDeviceIDs[iDevice] >= 0; iDevice++) { |
669 |
ts << endl; |
ts << endl; |
670 |
qsamplerDevice device(m_pClient, qsamplerDevice::Audio, piDeviceIDs[iDevice]); |
qsamplerDevice device(this, qsamplerDevice::Audio, piDeviceIDs[iDevice]); |
671 |
// Audio device specification... |
// Audio device specification... |
672 |
ts << "# " << device.deviceTypeName() << " " << device.driverName() |
ts << "# " << device.deviceTypeName() << " " << device.driverName() |
673 |
<< " " << tr("Device") << " " << iDevice << endl; |
<< " " << tr("Device") << " " << iDevice << endl; |
677 |
deviceParam != device.params().end(); |
deviceParam != device.params().end(); |
678 |
++deviceParam) { |
++deviceParam) { |
679 |
const qsamplerDeviceParam& param = deviceParam.data(); |
const qsamplerDeviceParam& param = deviceParam.data(); |
680 |
if (!param.value.isEmpty()) |
if (param.value.isEmpty()) ts << "# "; |
681 |
ts << " " << deviceParam.key() << "='" << param.value << "'"; |
ts << " " << deviceParam.key() << "='" << param.value << "'"; |
682 |
} |
} |
683 |
ts << endl; |
ts << endl; |
684 |
// Audio channel parameters... |
// Audio channel parameters... |
691 |
portParam != pPort->params().end(); |
portParam != pPort->params().end(); |
692 |
++portParam) { |
++portParam) { |
693 |
const qsamplerDeviceParam& param = portParam.data(); |
const qsamplerDeviceParam& param = portParam.data(); |
694 |
if (!param.fix && !param.value.isEmpty()) { |
if (param.fix || param.value.isEmpty()) ts << "# "; |
695 |
ts << "SET AUDIO_OUTPUT_CHANNEL_PARAMETER " << iDevice |
ts << "SET AUDIO_OUTPUT_CHANNEL_PARAMETER " << iDevice |
696 |
<< " " << iPort << " " << portParam.key() |
<< " " << iPort << " " << portParam.key() |
697 |
<< "='" << param.value << "'" << endl; |
<< "='" << param.value << "'" << endl; |
|
} |
|
698 |
} |
} |
699 |
} |
} |
700 |
// Audio device index/id mapping. |
// Audio device index/id mapping. |
707 |
piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Midi); |
piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Midi); |
708 |
for (iDevice = 0; piDeviceIDs && piDeviceIDs[iDevice] >= 0; iDevice++) { |
for (iDevice = 0; piDeviceIDs && piDeviceIDs[iDevice] >= 0; iDevice++) { |
709 |
ts << endl; |
ts << endl; |
710 |
qsamplerDevice device(m_pClient, qsamplerDevice::Midi, piDeviceIDs[iDevice]); |
qsamplerDevice device(this, qsamplerDevice::Midi, piDeviceIDs[iDevice]); |
711 |
// MIDI device specification... |
// MIDI device specification... |
712 |
ts << "# " << device.deviceTypeName() << " " << device.driverName() |
ts << "# " << device.deviceTypeName() << " " << device.driverName() |
713 |
<< " " << tr("Device") << " " << iDevice << endl; |
<< " " << tr("Device") << " " << iDevice << endl; |
717 |
deviceParam != device.params().end(); |
deviceParam != device.params().end(); |
718 |
++deviceParam) { |
++deviceParam) { |
719 |
const qsamplerDeviceParam& param = deviceParam.data(); |
const qsamplerDeviceParam& param = deviceParam.data(); |
720 |
if (!param.value.isEmpty()) |
if (param.value.isEmpty()) ts << "# "; |
721 |
ts << " " << deviceParam.key() << "='" << param.value << "'"; |
ts << " " << deviceParam.key() << "='" << param.value << "'"; |
722 |
} |
} |
723 |
ts << endl; |
ts << endl; |
724 |
// MIDI port parameters... |
// MIDI port parameters... |
731 |
portParam != pPort->params().end(); |
portParam != pPort->params().end(); |
732 |
++portParam) { |
++portParam) { |
733 |
const qsamplerDeviceParam& param = portParam.data(); |
const qsamplerDeviceParam& param = portParam.data(); |
734 |
if (!param.fix && !param.value.isEmpty()) { |
if (param.fix || param.value.isEmpty()) ts << "# "; |
735 |
ts << "SET MIDI_INPUT_PORT_PARAMETER " << iDevice |
ts << "SET MIDI_INPUT_PORT_PARAMETER " << iDevice |
736 |
<< " " << iPort << " " << portParam.key() |
<< " " << iPort << " " << portParam.key() |
737 |
<< "='" << param.value << "'" << endl; |
<< "='" << param.value << "'" << endl; |
|
} |
|
738 |
} |
} |
739 |
} |
} |
740 |
// MIDI device index/id mapping. |
// MIDI device index/id mapping. |