mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:09:24 +02:00
removing lock from WASAPI initialization
This commit is contained in:
parent
343807a9f5
commit
bc41087ea9
1 changed files with 4 additions and 6 deletions
|
@ -324,12 +324,10 @@ AudioClient::AudioClient() {
|
||||||
|
|
||||||
connect(&_receivedAudioStream, &InboundAudioStream::mismatchedAudioCodec, this, &AudioClient::handleMismatchAudioFormat);
|
connect(&_receivedAudioStream, &InboundAudioStream::mismatchedAudioCodec, this, &AudioClient::handleMismatchAudioFormat);
|
||||||
|
|
||||||
{
|
// initialize wasapi; if getAvailableDevices is called from the CheckDevicesThread before this, it will crash
|
||||||
QReadLocker readLock(&_hmdNameLock);
|
getAvailableDevices(QAudio::AudioInput, QString());
|
||||||
// initialize wasapi; if getAvailableDevices is called from the CheckDevicesThread before this, it will crash
|
getAvailableDevices(QAudio::AudioOutput, QString());
|
||||||
getAvailableDevices(QAudio::AudioInput, _hmdInputName);
|
|
||||||
getAvailableDevices(QAudio::AudioOutput, _hmdOutputName);
|
|
||||||
}
|
|
||||||
// start a thread to detect any device changes
|
// start a thread to detect any device changes
|
||||||
_checkDevicesTimer = new QTimer(this);
|
_checkDevicesTimer = new QTimer(this);
|
||||||
const unsigned long DEVICE_CHECK_INTERVAL_MSECS = 2 * 1000;
|
const unsigned long DEVICE_CHECK_INTERVAL_MSECS = 2 * 1000;
|
||||||
|
|
Loading…
Reference in a new issue