Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Issue 135853022: Defer OSX output stream Start() around system supend and resume. (Closed)

Created:
6 years, 11 months ago by DaleCurtis
Modified:
6 years, 11 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Defer OSX output stream Start() around system supend and resume. Uses base::PowerMonitor to watch for suspend and resume events and disables stream creation during suspend and for a second after a resume is detected. Since Start() is asynchronous anyways, this is pretty self contained change. If Stop() occurs before the deferred Start(), the pending task is simply canceled. This method has the advantage of preemptively preventing stream hangs instead of trying to correct them after the fact. It's also far less invasive than the "restart all streams" workaround. A risk is that the post-resume delay is not long enough. BUG=160920 TEST=repeated start/stop no longer fails. NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247026

Patch Set 1 #

Patch Set 2 : Wait for initialization. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -1 line) Patch
M media/audio/mac/audio_auhal_mac.h View 2 chunks +4 lines, -0 lines 0 comments Download
M media/audio/mac/audio_auhal_mac.cc View 3 chunks +17 lines, -0 lines 0 comments Download
M media/audio/mac/audio_auhal_mac_unittest.cc View 1 1 chunk +4 lines, -1 line 0 comments Download
M media/audio/mac/audio_manager_mac.h View 2 chunks +17 lines, -0 lines 0 comments Download
M media/audio/mac/audio_manager_mac.cc View 4 chunks +58 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
DaleCurtis
Here's the alternate workaround I discussed previously. It resolves the issue when tested with my ...
6 years, 11 months ago (2014-01-16 23:04:46 UTC) #1
scherkus (not reviewing)
Is the idea to remove the other workaround, or to keep both in place as ...
6 years, 11 months ago (2014-01-17 17:53:01 UTC) #2
DaleCurtis
Ideally I'd remove the other workaround, but they could live side by side. As mentioned ...
6 years, 11 months ago (2014-01-17 19:25:34 UTC) #3
scherkus (not reviewing)
bombs away! lgtm
6 years, 11 months ago (2014-01-17 23:04:45 UTC) #4
scherkus (not reviewing)
bombs away! lgtm
6 years, 11 months ago (2014-01-17 23:04:46 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/135853022/1
6 years, 11 months ago (2014-01-17 23:34:33 UTC) #6
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) media_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=213448
6 years, 11 months ago (2014-01-18 00:15:46 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/135853022/290001
6 years, 11 months ago (2014-01-18 01:30:24 UTC) #8
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) media_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=213517
6 years, 11 months ago (2014-01-18 02:06:09 UTC) #9
DaleCurtis
PTAL. I had to rewrite the AUHAL test to move them onto the audio thread ...
6 years, 11 months ago (2014-01-22 01:42:40 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/135853022/560001
6 years, 11 months ago (2014-01-25 00:05:26 UTC) #11
commit-bot: I haz the power
6 years, 11 months ago (2014-01-25 00:11:21 UTC) #12
Message was sent while issue was closed.
Change committed as 247026

Powered by Google App Engine
This is Rietveld 408576698