diff options
author | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-15 19:29:36 +0000 |
---|---|---|
committer | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-15 19:29:36 +0000 |
commit | 77dfc705d617515d58280d332ec9fb804718c5a3 (patch) | |
tree | 411f5b027393b968667e9ea1e718e7892e0799d1 /media/audio/win/audio_manager_win.cc | |
parent | 3a344bcec27bddb2cb5f4f3157c187366cf930ce (diff) | |
download | chromium_src-77dfc705d617515d58280d332ec9fb804718c5a3.zip chromium_src-77dfc705d617515d58280d332ec9fb804718c5a3.tar.gz chromium_src-77dfc705d617515d58280d332ec9fb804718c5a3.tar.bz2 |
Revert 142430 - 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.
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=114701
BUG=129190
BUG=131720
BUG=132009
TEST=Should not be noticeable difference in behavior.
TEST=Startup of 2nd stream should become somewhat faster.
TEST=Run tests on Win7 and XP myself.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=141770
Review URL: https://chromiumcodereview.appspot.com/10540034
TBR=enal@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10544183
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142444 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/win/audio_manager_win.cc')
-rw-r--r-- | media/audio/win/audio_manager_win.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc index 38c4615..93dcf2f 100644 --- a/media/audio/win/audio_manager_win.cc +++ b/media/audio/win/audio_manager_win.cc @@ -244,10 +244,7 @@ AudioOutputStream* AudioManagerWin::MakeLinearOutputStream( if (params.channels() > kWinMaxChannels) return NULL; - return new PCMWaveOutAudioOutputStream(this, - params, - media::NumberOfWaveOutBuffers(), - WAVE_MAPPER); + return new PCMWaveOutAudioOutputStream(this, params, 3, WAVE_MAPPER); } // Factory for the implementations of AudioOutputStream for |