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

Unified Diff: media/audio/simple_sources_unittest.cc

Issue 9692038: stopping the audio thread before destroying the AudioManager<Platform> (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Android compiling problem Created 8 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
Index: media/audio/simple_sources_unittest.cc
diff --git a/media/audio/simple_sources_unittest.cc b/media/audio/simple_sources_unittest.cc
index ef00ed77c20a96f6c869608bb207f7aeaf37739f..09e4ce959fcc61f8fb5dc80fe54e039cebdeb36f 100644
--- a/media/audio/simple_sources_unittest.cc
+++ b/media/audio/simple_sources_unittest.cc
@@ -78,12 +78,11 @@ TEST(SimpleSources, SineWaveAudio16MonoTest) {
oas->Start(&source);
oas->Stop();
- oas->Close();
- ASSERT_TRUE(FakeAudioOutputStream::GetLastFakeStream());
+ ASSERT_TRUE(FakeAudioOutputStream::GetCurrentFakeStream());
const int16* last_buffer =
reinterpret_cast<int16*>(
- FakeAudioOutputStream::GetLastFakeStream()->buffer());
+ FakeAudioOutputStream::GetCurrentFakeStream()->buffer());
ASSERT_TRUE(NULL != last_buffer);
uint32 half_period = AudioParameters::kTelephoneSampleRate / (freq * 2);
@@ -98,4 +97,5 @@ TEST(SimpleSources, SineWaveAudio16MonoTest) {
EXPECT_EQ(-5126, last_buffer[half_period + 1]);
EXPECT_TRUE(last_buffer[half_period + 1] > last_buffer[half_period + 2]);
EXPECT_TRUE(last_buffer[half_period + 2] > last_buffer[half_period + 3]);
+ oas->Close();
}

Powered by Google App Engine
This is Rietveld 408576698