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

Issue 10560038: Change the way we are stopping audio stream on Mac once again. (Closed)

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

Description

Change the way we are stopping audio stream on Mac once again. r142235 was not enough, we were not touching audio buffers after stop, but OS could still touch audio queue. That causes problems if we were deleting audio stream immediately after stopping, e.g. if audio mixer tried to keep audio stream opened after last logical stream stopped and then stopped/closed it. I was able to reproduce the problem locally (for whatever reason this time it worked), and after the fix it (finally) went away -- browsert_tests PPAPITest.Audio_Creation successfully runs for 300 iterations. When I revert to previos way of signaling, problem resurfaces again. Fix is to use "property listener" to listen to "is running" audio queue property, and signal "stream stopped" event only after "is running" property changes to false. Functions that do are documented in the Apple core audio documentation but not used in samples, so they are hard to find if you don't know what to look for. Also re-enabling mixer change to keep physical stream opened for some time, That should complete browser-side mixer work and fix several related bugs. BUG=102395 BUG=114701 BUG=129190 BUG=131720 TEST=No observable diffs, but crashes and seek problems should go away. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=142862

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -56 lines) Patch
M media/audio/audio_output_mixer.cc View 3 chunks +16 lines, -34 lines 0 comments Download
M media/audio/mac/audio_output_mac.h View 2 chunks +11 lines, -4 lines 0 comments Download
M media/audio/mac/audio_output_mac.cc View 1 4 chunks +52 lines, -18 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
scherkus (not reviewing)
https://chromiumcodereview.appspot.com/10560038/diff/1/media/audio/mac/audio_output_mac.cc File media/audio/mac/audio_output_mac.cc (right): https://chromiumcodereview.appspot.com/10560038/diff/1/media/audio/mac/audio_output_mac.cc#newcode435 media/audio/mac/audio_output_mac.cc:435: audio_stream->stop_requested_ = true; do we need to reset this ...
8 years, 6 months ago (2012-06-18 19:40:53 UTC) #1
enal1
Replied. As I changed the sources I am again building and running tests, it will ...
8 years, 6 months ago (2012-06-18 19:58:47 UTC) #2
scherkus (not reviewing)
LGTM code-wise -- as you mention I'll leave it up to your for proper testing ...
8 years, 6 months ago (2012-06-18 20:07:35 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enal@chromium.org/10560038/5001
8 years, 6 months ago (2012-06-18 21:54:16 UTC) #4
commit-bot: I haz the power
8 years, 6 months ago (2012-06-18 23:42:54 UTC) #5
Change committed as 142862

Powered by Google App Engine
This is Rietveld 408576698