mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-19 08:18:05 +02:00
Merge pull request #713 from kasenvr/fix/audio-switching-crash
Fix audio output switching crash
This commit is contained in:
commit
b3d618a527
1 changed files with 2 additions and 1 deletions
|
@ -2072,7 +2072,6 @@ bool AudioClient::switchOutputToAudioDevice(const HifiAudioDeviceInfo outputDevi
|
|||
// NOTE: device start() uses the Qt internal device list
|
||||
Lock lock(_deviceMutex);
|
||||
|
||||
Lock localAudioLock(_localAudioMutex);
|
||||
_localSamplesAvailable.exchange(0, std::memory_order_release);
|
||||
|
||||
//wait on local injectors prep to finish running
|
||||
|
@ -2080,6 +2079,8 @@ bool AudioClient::switchOutputToAudioDevice(const HifiAudioDeviceInfo outputDevi
|
|||
_localPrepInjectorFuture.waitForFinished();
|
||||
}
|
||||
|
||||
Lock localAudioLock(_localAudioMutex);
|
||||
|
||||
// cleanup any previously initialized device
|
||||
if (_audioOutput) {
|
||||
_audioOutputIODevice.close();
|
||||
|
|
Loading…
Reference in a new issue