From 1328d55d94cf7b973da1a0a884735c8cbdeb2423 Mon Sep 17 00:00:00 2001 From: "hclam@chromium.org" Date: Mon, 24 Aug 2009 18:00:32 +0000 Subject: Providing unplayed bytes in audio hardware buffer BUG=20007 TEST=WinAudioTest.PCMWaveStreamPendingBytes We used to guess what is in the hardware audio buffer to perform audio sync. But due the triple buffering and other platforms has other buffering scheme we need to be able to know how many bytes are left in the hardware buffer. We provide this data via AudioCallback::OnMoreData(), so we can predict when the requested buffer will be played. Review URL: http://codereview.chromium.org/174243 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24114 0039d316-1c4b-4281-b951-d872f2087c98 --- media/audio/simple_sources_unittest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media/audio/simple_sources_unittest.cc') diff --git a/media/audio/simple_sources_unittest.cc b/media/audio/simple_sources_unittest.cc index ef6a5a7..51eb8db 100644 --- a/media/audio/simple_sources_unittest.cc +++ b/media/audio/simple_sources_unittest.cc @@ -54,7 +54,7 @@ TEST(SimpleSourcesTest, PushSourceSmallerWrite) { // Read everything from the push source. for (size_t i = 0; i < kDataSize; i += kReadSize) { size_t size = std::min(kDataSize - i , kReadSize); - EXPECT_EQ(size, push_source.OnMoreData(NULL, read_data.get(), size)); + EXPECT_EQ(size, push_source.OnMoreData(NULL, read_data.get(), size, 0)); EXPECT_EQ(0, memcmp(data.get() + i, read_data.get(), size)); } EXPECT_EQ(0u, push_source.UnProcessedBytes()); -- cgit v1.1