RESOLVED FIXED 218251
[GPUProcess] Use async IPC for RemoteAudioDestinationManager's StartAudioDestination / StopAudioDestination
https://bugs.webkit.org/show_bug.cgi?id=218251
Summary [GPUProcess] Use async IPC for RemoteAudioDestinationManager's StartAudioDest...
Chris Dumez
Reported 2020-10-27 11:55:41 PDT
Use async IPC for RemoteAudioDestinationManager's StartAudioDestination / StopAudioDestination.
Attachments
Patch (34.87 KB, patch)
2020-10-27 12:59 PDT, Chris Dumez
no flags
Patch (34.84 KB, patch)
2020-10-27 13:46 PDT, Chris Dumez
no flags
Peng Liu
Comment 1 2020-10-27 12:16:00 PDT
*** Bug 217990 has been marked as a duplicate of this bug. ***
Chris Dumez
Comment 2 2020-10-27 12:59:21 PDT
Peng Liu
Comment 3 2020-10-27 13:38:32 PDT
Comment on attachment 412454 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=412454&action=review > Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.cpp:132 > + completionHandler(Exception { InvalidStateError, "Failed to start the audio device"_s }); Nit. Can be done in one line as in DefaultAudioDestinationNode::resume(). > Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.cpp:148 > + completionHandler(success ? WTF::nullopt : makeOptional(Exception { InvalidStateError, "Failed to start audio device"_s })); Nit. Maybe we can use the same error message as in DefaultAudioDestinationNode::startRendering()? s/"Failed to start audio device"_s/"Failed to start the audio device"_s/ > Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.cpp:163 > + completionHandler(success ? WTF::nullopt : makeOptional(Exception { InvalidStateError, "Failed to stop audio device"_s })); Ditto. s/"Failed to stop audio device"_s/"Failed to stop the audio device"_s/ > Source/WebCore/platform/audio/cocoa/AudioDestinationCocoa.cpp:106 > + auto success = !m_audioOutputUnitAdaptor.start(); Nit. OK as it is. Maybe "auto success = m_audioOutputUnitAdaptor.start() == noErr" is better? > Source/WebCore/platform/audio/cocoa/AudioDestinationCocoa.cpp:118 > + auto success = !m_audioOutputUnitAdaptor.stop(); Ditto.
Chris Dumez
Comment 4 2020-10-27 13:43:29 PDT
(In reply to Peng Liu from comment #3) > Comment on attachment 412454 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=412454&action=review > > > Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.cpp:132 > > + completionHandler(Exception { InvalidStateError, "Failed to start the audio device"_s }); > > Nit. Can be done in one line as in DefaultAudioDestinationNode::resume(). > > > Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.cpp:148 > > + completionHandler(success ? WTF::nullopt : makeOptional(Exception { InvalidStateError, "Failed to start audio device"_s })); > > Nit. Maybe we can use the same error message as in > DefaultAudioDestinationNode::startRendering()? > s/"Failed to start audio device"_s/"Failed to start the audio device"_s/ > > > Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.cpp:163 > > + completionHandler(success ? WTF::nullopt : makeOptional(Exception { InvalidStateError, "Failed to stop audio device"_s })); > > Ditto. s/"Failed to stop audio device"_s/"Failed to stop the audio device"_s/ > > > Source/WebCore/platform/audio/cocoa/AudioDestinationCocoa.cpp:106 > > + auto success = !m_audioOutputUnitAdaptor.start(); > > Nit. OK as it is. Maybe "auto success = m_audioOutputUnitAdaptor.start() == > noErr" is better? > > > Source/WebCore/platform/audio/cocoa/AudioDestinationCocoa.cpp:118 > > + auto success = !m_audioOutputUnitAdaptor.stop(); > > Ditto. Thanks for looking. I will fix all these shortly.
Chris Dumez
Comment 5 2020-10-27 13:46:03 PDT
Geoffrey Garen
Comment 6 2020-10-27 13:54:33 PDT
Comment on attachment 412460 [details] Patch r=me
EWS
Comment 7 2020-10-27 14:46:26 PDT
Committed r269073: <https://trac.webkit.org/changeset/269073> All reviewed patches have been landed. Closing bug and clearing flags on attachment 412460 [details].
Radar WebKit Bug Importer
Comment 8 2020-10-27 14:47:21 PDT
Note You need to log in before you can comment on or make changes to this bug.