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

Unified Diff: media/audio/audio_input_controller.cc

Issue 216483003: Disable the "check for no data" timer for audio on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_input_controller.cc
diff --git a/media/audio/audio_input_controller.cc b/media/audio/audio_input_controller.cc
index 7cac8a7358364b8a92de9a634c4f3bc4a2535715..ef2c4a9e2e871178e21eb08be2b704136bbcfac1 100644
--- a/media/audio/audio_input_controller.cc
+++ b/media/audio/audio_input_controller.cc
@@ -18,6 +18,8 @@ const int kMaxInputChannels = 2;
// to resolve http://crbug.com/79936 for Windows platforms. This then caused
// breakage (very hard to repro bugs!) on other platforms: See
// http://crbug.com/226327 and http://crbug.com/230972.
+// See also that the timer has been disabled on Mac now due to
+// crbug.com/357501.
const int kTimerResetIntervalSeconds = 1;
// We have received reports that the timer can be too trigger happy on some
// Mac devices and the initial timer interval has therefore been increased
@@ -199,6 +201,13 @@ void AudioInputController::DoCreateForStream(
}
DCHECK(!no_data_timer_.get());
+
+#if defined(OS_MACOSX)
+ // This is a fix for crbug.com/357501. The timer can trigger when closing
+ // the lid on Macs, which causes more problems than the timer fixes.
+ enable_nodata_timer = false;
+#endif
+
if (enable_nodata_timer) {
// Create the data timer which will call DoCheckForNoData(). The timer
// is started in DoRecord() and restarted in each DoCheckForNoData()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698