Fix issue where mac was crashing during an attempt to unplug or replug microphone. (#4897)
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
4e2a9667bd
commit
164912418c
|
|
@ -572,14 +572,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