1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| // Récupère le périphéque QAudioDeviceInfo à l'index donné
q_deviceInput = list.value(index).first(); // <--- donc ici je récupère mon QAudioDeviceInfo récupéré sur une ComboBox qui m'affiche mes périphériques en sortie
if (q_deviceInput.isNull())
{
return false;
}
if (!q_deviceInput.isFormatSupported(q_formatInput)) {
q_formatInput = q_deviceInput.nearestFormat(q_formatInput);
}
q_input = new QAudioInput(q_deviceInput, q_formatInput, this);
// Récupère le périphéque QAudioDeviceInfo à l'index donné
q_deviceOutput = list.value(index).first(); // <--- donc ici je récupère mon QAudioDeviceInfo récupéré sur une ComboBox qui m'affiche mes périphériques en sortie
// Si périphérique NULL
if (q_deviceOutput.isNull())
{
return false;
}
q_output = new QAudioOutput(q_deviceOutput, q_formatOutput, this);
q_output->start(q_input->start()); |
Partager