AVAudioSessionCaptureDeviceManager is not always computing the right default input device
<rdar://87707090>
Created attachment 449479 [details] Patch
Comment on attachment 449479 [details] Patch What is our testing strategy for these kinds of things? I worry that we could easily break this and would not notice.
(In reply to Darin Adler from comment #3) > Comment on attachment 449479 [details] > Patch > > What is our testing strategy for these kinds of things? I worry that we > could easily break this and would not notice. This whole area sadly resorts on manual testing. It would be nice to automate more this area but this requires efforts outside WebKit. I guess I can add some some manual test pages to help validating non regressions easily.
Committed r288275 (246213@main): <https://commits.webkit.org/246213@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 449479 [details].
Comment on attachment 449479 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=449479&action=review > Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:243 > + RELEASE_LOG_INFO(WebRTC, "AVAudioSessionCaptureDeviceManager using previous default input"); Isn't it the other side of the if branch that uses m_lastDefaultMicrophone as defaultInput?
Can we at least verify WebKit's internal behavior through mocking? That wouldn't prove that the mic actually worked, but it would prove that our code did what we thought it would.
Comment on attachment 449479 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=449479&action=review >> Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:243 >> + RELEASE_LOG_INFO(WebRTC, "AVAudioSessionCaptureDeviceManager using previous default input"); > > Isn't it the other side of the if branch that uses m_lastDefaultMicrophone as defaultInput? Right, will fix it.
(In reply to Geoffrey Garen from comment #7) > Can we at least verify WebKit's internal behavior through mocking? That > wouldn't prove that the mic actually worked, but it would prove that our > code did what we thought it would. AVAudioSessionCaptureDeviceManager is not mocked at all like CoreAudioSharedUnit is. But we should probably try to do so. I'll think more about it.
Reopening to attach new patch.
Created attachment 449812 [details] Patch
Committed r288441 (246330@main): <https://commits.webkit.org/246330@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 449812 [details].