diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 03:07:19 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 03:07:19 +0000 |
commit | 9ade381f46175dead00a1cc9ffc3328230e8c982 (patch) | |
tree | 64c6caf04643408b2e25bce192f03c9b7b93eaa2 /media/audio/simple_sources_unittest.cc | |
parent | adc19c0eeac9f3caaae4e35bd64e79e6b6e72a0f (diff) | |
download | chromium_src-9ade381f46175dead00a1cc9ffc3328230e8c982.zip chromium_src-9ade381f46175dead00a1cc9ffc3328230e8c982.tar.gz chromium_src-9ade381f46175dead00a1cc9ffc3328230e8c982.tar.bz2 |
Simplified AudioOutputStream interface.
1. Removed packet_size parameter from Open().
2. Removed OnClose() from the callback. Now the callback is guaranteed to be called only between Start() and Stop().
3. Added samples_per_packet in the AudioParameters struct.
BUG=39825
TEST=Unittests
Review URL: http://codereview.chromium.org/4661001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/simple_sources_unittest.cc')
-rw-r--r-- | media/audio/simple_sources_unittest.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/media/audio/simple_sources_unittest.cc b/media/audio/simple_sources_unittest.cc index bbcbff2..f96ffad 100644 --- a/media/audio/simple_sources_unittest.cc +++ b/media/audio/simple_sources_unittest.cc @@ -58,8 +58,6 @@ TEST(SimpleSourcesTest, PushSourceSmallerWrite) { EXPECT_EQ(0, memcmp(data.get() + i, read_data.get(), size)); } EXPECT_EQ(0u, push_source.UnProcessedBytes()); - - push_source.OnClose(NULL); } // Validate that the SineWaveAudioSource writes the expected values for @@ -78,10 +76,10 @@ TEST(SimpleSources, SineWaveAudio16MonoTest) { ASSERT_TRUE(NULL != audio_man); AudioParameters params( AudioParameters::AUDIO_MOCK, 1, AudioParameters::kTelephoneSampleRate, - bytes_per_sample * 2); + bytes_per_sample * 2, samples); AudioOutputStream* oas = audio_man->MakeAudioOutputStream(params); ASSERT_TRUE(NULL != oas); - EXPECT_TRUE(oas->Open(samples * bytes_per_sample)); + EXPECT_TRUE(oas->Open()); oas->Start(&source); oas->Stop(); |