In UserMediaCaptureManagerProxy.cpp void audioUnitWillStart() final { // FIXME: WebProcess might want to set the category/bufferSize itself, in which case we should remove that code. auto bufferSize = AudioSession::sharedSession().sampleRate() / 50; if (AudioSession::sharedSession().preferredBufferSize() > bufferSize) AudioSession::sharedSession().setPreferredBufferSize(bufferSize); AudioSession::sharedSession().setCategory(AudioSession::PlayAndRecord, RouteSharingPolicy::Default); } Probably we need to remove this code section now?
Assign to Youenn to take a look. :-)
Created attachment 428828 [details] Patch
Created attachment 428918 [details] Patch
Hum, in case of GPUProcess crash, we would need to ensure the audio session category is set before restarting audio capture. There is no such guarantee right now.
<rdar://problem/78282244>