summaryrefslogtreecommitdiffstats
path: root/media/audio/audio_input_unittest.cc
diff options
context:
space:
mode:
authordalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-07 06:24:32 +0000
committerdalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-07 06:24:32 +0000
commit0d6e39ec60875d17cd5c7df9a7f648c657d62080 (patch)
tree8f16980a4933fc84f5bd5dfa540994f4b80bcf43 /media/audio/audio_input_unittest.cc
parent90835a86223bcf27de0664cea802cb2f120d8b4d (diff)
downloadchromium_src-0d6e39ec60875d17cd5c7df9a7f648c657d62080.zip
chromium_src-0d6e39ec60875d17cd5c7df9a7f648c657d62080.tar.gz
chromium_src-0d6e39ec60875d17cd5c7df9a7f648c657d62080.tar.bz2
Delay delivery of audio input data.
The AudioQueue API may use a large internal buffer and repeatedly call us back to back once that internal buffer is filled. When this happens the renderer client does not have enough time to read data back from the shared memory before the next write comes along. If HandleInputBuffer() is called too frequently, Sleep() to simulate realtime input and ensure the shared memory doesn't get trampled. BUG=157613 TEST=Playback works on older style Mac units. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171681 Review URL: https://codereview.chromium.org/11482002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171701 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/audio_input_unittest.cc')
-rw-r--r--media/audio/audio_input_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/audio/audio_input_unittest.cc b/media/audio/audio_input_unittest.cc
index 9070b78..b3f7eb3 100644
--- a/media/audio/audio_input_unittest.cc
+++ b/media/audio/audio_input_unittest.cc
@@ -152,9 +152,9 @@ TEST(AudioInputTest, Record) {
message_loop.PostDelayedTask(
FROM_HERE,
MessageLoop::QuitClosure(),
- base::TimeDelta::FromMilliseconds(690));
+ base::TimeDelta::FromMilliseconds(500));
message_loop.Run();
- EXPECT_GE(test_callback.callback_count(), 10);
+ EXPECT_GE(test_callback.callback_count(), 1);
EXPECT_FALSE(test_callback.had_error());
ais->Stop();