diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-13 01:06:11 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-13 01:06:11 +0000 |
commit | 07e2e06df85a43a5e91e09aad7a3f7c4fc68a34a (patch) | |
tree | 3f28f697e3c467c233df4fa665b66e2e26ba03cb /media/audio/audio_output_controller.h | |
parent | 8ffca206c420fd3d25d25ae450ea96fa95e67be2 (diff) | |
download | chromium_src-07e2e06df85a43a5e91e09aad7a3f7c4fc68a34a.zip chromium_src-07e2e06df85a43a5e91e09aad7a3f7c4fc68a34a.tar.gz chromium_src-07e2e06df85a43a5e91e09aad7a3f7c4fc68a34a.tar.bz2 |
Revert 141770 - Do not stop audio physical stream immediately after logical one had stopped.
Wait some time.
We are still stopping/closing the stream, as (1) it is better for battery life,
and (2) some people can hear active device even when it is playing silence.
That increased audio startup latency, especially on Windows, because we are using 3
buffers on Windows. To fix that I changed the code to use 2 buffers on presumable
good Windows boxes -- i.e. running non-Vista and having more than single core.
Changed unit tests as well.
That CL finishes work on browser-side audio mixer. Not sure how important it is,
though -- hopefully it will provide some time while implementing renderer-side mixer.
Also moved code for crash Mac OS X into audio mixer, because problem can manifest
itself if Close() called immediately after Stop().
That CL also fixes bug 131720. Looks that it was caused by timing change, and starting
stream earlier causes less dropped frames. (I still cannot understand why on modern
system we should have even single dropped frame, and why slight timing change
caused us to drop frame, but that is different question...)
BUG=129190
BUG=131720
BUG=131720
BUG=102395
TEST=Should not be noticeable difference in behavior. Run tests on Win7 and XP myself.
TEST=Mac crashes on seeks should go away, too.
Review URL: https://chromiumcodereview.appspot.com/10540034
TBR=enal@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10532116
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141820 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/audio_output_controller.h')
-rw-r--r-- | media/audio/audio_output_controller.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h index 33bf217..2077c9b 100644 --- a/media/audio/audio_output_controller.h +++ b/media/audio/audio_output_controller.h @@ -225,6 +225,9 @@ class MEDIA_EXPORT AudioOutputController // Also, if we're shutting down, we do not want to poll for more data. base::WeakPtrFactory<AudioOutputController> weak_this_; + // Workaround for Mac OS X bug, see crbug.com/128128. + base::Time previous_stop_time_; + DISALLOW_COPY_AND_ASSIGN(AudioOutputController); }; |