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

Unified Diff: media/audio/audio_input_volume_unittest.cc

Issue 1111503003: Revert of Switch to STA mode for audio thread and WASAPI I/O streams. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | media/audio/audio_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_input_volume_unittest.cc
diff --git a/media/audio/audio_input_volume_unittest.cc b/media/audio/audio_input_volume_unittest.cc
index 19c712a99ef49bc1ad4d692bb148148a709d96a0..d6ee313bc250a6ede92bc0b95f90598aa3386061 100644
--- a/media/audio/audio_input_volume_unittest.cc
+++ b/media/audio/audio_input_volume_unittest.cc
@@ -38,7 +38,13 @@
class AudioInputVolumeTest : public ::testing::Test {
protected:
- AudioInputVolumeTest() : audio_manager_(AudioManager::CreateForTesting()) {}
+ AudioInputVolumeTest()
+ : audio_manager_(AudioManager::CreateForTesting())
+#if defined(OS_WIN)
+ , com_init_(base::win::ScopedCOMInitializer::kMTA)
+#endif
+ {
+ }
bool HasCoreAudioAndInputDevices() {
#if defined(OS_WIN)
@@ -64,27 +70,27 @@
params, device_id);
EXPECT_TRUE(NULL != ais);
-#if defined(OS_MACOSX)
- EXPECT_TRUE(ais->Open());
-#else
- // Some linux devices do not support our settings and some Windows devices
- // may be "currently unavailable", we may fail to open those devices.
+#if defined(OS_LINUX) || defined(OS_OPENBSD)
+ // Some linux devices do not support our settings, we may fail to open
+ // those devices.
if (!ais->Open()) {
// Default device should always be able to be opened.
EXPECT_TRUE(AudioManagerBase::kDefaultDeviceId != device_id);
ais->Close();
ais = NULL;
}
+#elif defined(OS_WIN) || defined(OS_MACOSX)
+ EXPECT_TRUE(ais->Open());
#endif
return ais;
}
+ scoped_ptr<AudioManager> audio_manager_;
+
#if defined(OS_WIN)
base::win::ScopedCOMInitializer com_init_;
#endif
-
- scoped_ptr<AudioManager> audio_manager_;
};
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
« no previous file with comments | « no previous file | media/audio/audio_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698