diff options
| author | stonedDiscord <stoned@derpymail.org> | 2019-08-19 19:38:47 +0200 |
|---|---|---|
| committer | stonedDiscord <stoned@derpymail.org> | 2019-08-19 19:38:47 +0200 |
| commit | d94d2fb405a0d3634951cc8fa4b0e22c7979c438 (patch) | |
| tree | 8cc1abb9044101e5162b1f7c52cb894698ed0b32 /src/courtroom.cpp | |
| parent | 35f2333403cdd930848fb998739583c6c829f5d3 (diff) | |
read and store qt audio device
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 54b1b2df..a1714163 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -28,6 +28,20 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow() } } } + #elif defined QTAUDIO + + if (ao_app->get_audio_output_device() != "default") + { + foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioOutput)) + { + if (ao_app->get_audio_output_device() == deviceInfo.deviceName()) + { + ao_app->QtAudioDevice = deviceInfo; + qDebug() << deviceInfo.deviceName() << "was set as the default audio output device."; + break; + } + } + } #endif keepalive_timer = new QTimer(this); |
