Bug 202097 - AudioTrackPrivateMediaStreamCocoa does not need to manipulate the audio unit in play/pause methods
Summary: AudioTrackPrivateMediaStreamCocoa does not need to manipulate the audio unit ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-22 23:38 PDT by youenn fablet
Modified: 2019-09-24 01:42 PDT (History)
11 users (show)

See Also:


Attachments
Patch (4.80 KB, patch)
2019-09-22 23:41 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (5.50 KB, patch)
2019-09-23 07:23 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (5.79 KB, patch)
2019-09-23 23:28 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2019-09-22 23:38:01 PDT
AudioTrackPrivateMediaStreamCocoa does not need to manipulate the audio unit in play/pause methods
Comment 1 youenn fablet 2019-09-22 23:41:01 PDT
Created attachment 379357 [details]
Patch
Comment 2 youenn fablet 2019-09-23 02:52:08 PDT
<rdar://problem/51548144>
Comment 3 Eric Carlson 2019-09-23 06:06:27 PDT
Comment on attachment 379357 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=379357&action=review

> Source/WebCore/platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:89
> +    bool m_isTransitioningToPausing { false };
> +    bool m_isTransitioningToPlaying { false };

Couldn't we replace these with an enum? In a case where both are set simultaneously, wouldn't we always want the last one set to always "win"?
Comment 4 youenn fablet 2019-09-23 07:23:54 PDT
Created attachment 379369 [details]
Patch
Comment 5 youenn fablet 2019-09-23 07:24:24 PDT
> Couldn't we replace these with an enum? In a case where both are set
> simultaneously, wouldn't we always want the last one set to always "win"?

I tried to come up with a new approach without any transition values.
Comment 6 Eric Carlson 2019-09-23 07:44:43 PDT
Comment on attachment 379369 [details]
Patch

Nice approach! 

r=me once the bots are happy.
Comment 7 youenn fablet 2019-09-23 23:28:08 PDT
Created attachment 379433 [details]
Patch
Comment 8 youenn fablet 2019-09-24 00:55:58 PDT
(In reply to youenn fablet from comment #7)
> Created attachment 379433 [details]
> Patch

Added some logging in case of failing to start the audio unit.
Comment 9 WebKit Commit Bot 2019-09-24 01:42:10 PDT
Comment on attachment 379433 [details]
Patch

Clearing flags on attachment: 379433

Committed r250290: <https://trac.webkit.org/changeset/250290>
Comment 10 WebKit Commit Bot 2019-09-24 01:42:11 PDT
All reviewed patches have been landed.  Closing bug.