avoid calling QAudioDeviceInfo::availableDevices once per second on linux because it blocks the audio thread for ~1 second each time

This commit is contained in:
Seth Alves 2015-04-03 19:36:22 -07:00
parent 285cfe1f46
commit 61fb9adfca

View file

@ -1281,6 +1281,9 @@ qint64 AudioClient::AudioOutputIODevice::readData(char * data, qint64 maxSize) {
}
void AudioClient::checkDevices() {
# ifdef Q_OS_LINUX
// on linux, this makes the audio stream hiccup
# else
QVector<QString> inputDevices = getDeviceNames(QAudio::AudioInput);
QVector<QString> outputDevices = getDeviceNames(QAudio::AudioOutput);
@ -1290,6 +1293,7 @@ void AudioClient::checkDevices() {
emit deviceChanged();
}
# endif
}
void AudioClient::loadSettings() {