Fix issue where mac was crashing during an attempt to unplug or replug microphone (FS:TJ- Cherry-pick to help fix FIRE-36022 on macOS)
The mac audio device manager was being "helpful" by restarting playout and recording if the Default device was changed, assuming the application wouldn't care. However, we received an update of device change, and attempted to stop and start playout anyway, causing a conflict. The fix was simply to not deploy new devices when the device id didn't change.master
parent
c73ef2d2b1
commit
834b198a87
|
|
@ -644,14 +644,20 @@ void LLWebRTCImpl::workerDeployDevices()
|
|||
void LLWebRTCImpl::setCaptureDevice(const std::string &id)
|
||||
{
|
||||
|
||||
mRecordingDevice = id;
|
||||
deployDevices();
|
||||
if (mRecordingDevice != id)
|
||||
{
|
||||
mRecordingDevice = id;
|
||||
deployDevices();
|
||||
}
|
||||
}
|
||||
|
||||
void LLWebRTCImpl::setRenderDevice(const std::string &id)
|
||||
{
|
||||
mPlayoutDevice = id;
|
||||
deployDevices();
|
||||
if (mPlayoutDevice != id)
|
||||
{
|
||||
mPlayoutDevice = id;
|
||||
deployDevices();
|
||||
}
|
||||
}
|
||||
|
||||
// updateDevices needs to happen on the worker thread.
|
||||
|
|
|
|||
Loading…
Reference in New Issue