Index: media/audio/win/audio_low_latency_output_win_unittest.cc |
diff --git a/media/audio/win/audio_low_latency_output_win_unittest.cc b/media/audio/win/audio_low_latency_output_win_unittest.cc |
index 3ab9268cc58a642489abc4b176b591a1bd38703c..aee195a7526cf45f152e9f0c9ac3b88c2380254d 100644 |
--- a/media/audio/win/audio_low_latency_output_win_unittest.cc |
+++ b/media/audio/win/audio_low_latency_output_win_unittest.cc |
@@ -243,12 +243,23 @@ static AudioOutputStream* CreateDefaultAudioOutputStream( |
return aos; |
} |
+TEST(WASAPIAudioOutputStreamTest, HardwareChannelCount) { |
+ scoped_ptr<AudioManager> audio_manager(AudioManager::Create()); |
+ if (!CanRunAudioTests(audio_manager.get())) |
+ return; |
+ |
+ ScopedCOMInitializer com_init(ScopedCOMInitializer::kMTA); |
+ |
+ int channel_count = WASAPIAudioOutputStream::HardwareChannelCount(); |
+ EXPECT_GE(channel_count, 0); |
+} |
+ |
// Verify that we can retrieve the current hardware/mixing sample rate |
// for all supported device roles. The ERole enumeration defines constants |
// that indicate the role that the system/user has assigned to an audio |
// endpoint device. |
// TODO(henrika): modify this test when we support full device enumeration. |
-TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestHardwareSampleRate) { |
+TEST(WASAPIAudioOutputStreamTest, HardwareSampleRate) { |
// Skip this test in exclusive mode since the resulting rate is only utilized |
// for shared mode streams. |
scoped_ptr<AudioManager> audio_manager(AudioManager::Create()); |
@@ -275,7 +286,7 @@ TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestHardwareSampleRate) { |
} |
// Test Create(), Close() calling sequence. |
-TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestCreateAndClose) { |
+TEST(WASAPIAudioOutputStreamTest, CreateAndClose) { |
scoped_ptr<AudioManager> audio_manager(AudioManager::Create()); |
if (!CanRunAudioTests(audio_manager.get())) |
return; |
@@ -284,7 +295,7 @@ TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestCreateAndClose) { |
} |
// Test Open(), Close() calling sequence. |
-TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestOpenAndClose) { |
+TEST(WASAPIAudioOutputStreamTest, OpenAndClose) { |
scoped_ptr<AudioManager> audio_manager(AudioManager::Create()); |
if (!CanRunAudioTests(audio_manager.get())) |
return; |
@@ -294,7 +305,7 @@ TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestOpenAndClose) { |
} |
// Test Open(), Start(), Close() calling sequence. |
-TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestOpenStartAndClose) { |
+TEST(WASAPIAudioOutputStreamTest, OpenStartAndClose) { |
scoped_ptr<AudioManager> audio_manager(AudioManager::Create()); |
if (!CanRunAudioTests(audio_manager.get())) |
return; |
@@ -308,7 +319,7 @@ TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestOpenStartAndClose) { |
} |
// Test Open(), Start(), Stop(), Close() calling sequence. |
-TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestOpenStartStopAndClose) { |
+TEST(WASAPIAudioOutputStreamTest, OpenStartStopAndClose) { |
scoped_ptr<AudioManager> audio_manager(AudioManager::Create()); |
if (!CanRunAudioTests(audio_manager.get())) |
return; |
@@ -323,7 +334,7 @@ TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestOpenStartStopAndClose) { |
} |
// Test SetVolume(), GetVolume() |
-TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestVolume) { |
+TEST(WASAPIAudioOutputStreamTest, Volume) { |
scoped_ptr<AudioManager> audio_manager(AudioManager::Create()); |
if (!CanRunAudioTests(audio_manager.get())) |
return; |
@@ -360,7 +371,7 @@ TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestVolume) { |
} |
// Test some additional calling sequences. |
-TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestMiscCallingSequences) { |
+TEST(WASAPIAudioOutputStreamTest, MiscCallingSequences) { |
scoped_ptr<AudioManager> audio_manager(AudioManager::Create()); |
if (!CanRunAudioTests(audio_manager.get())) |
return; |
@@ -400,7 +411,7 @@ TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestMiscCallingSequences) { |
} |
// Use default packet size (10ms) and verify that rendering starts. |
-TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestPacketSizeInMilliseconds) { |
+TEST(WASAPIAudioOutputStreamTest, PacketSizeInMilliseconds) { |
scoped_ptr<AudioManager> audio_manager(AudioManager::Create()); |
if (!CanRunAudioTests(audio_manager.get())) |
return; |
@@ -438,7 +449,7 @@ TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestPacketSizeInMilliseconds) { |
// Use a fixed packets size (independent of sample rate) and verify |
// that rendering starts. |
-TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestPacketSizeInSamples) { |
+TEST(WASAPIAudioOutputStreamTest, PacketSizeInSamples) { |
scoped_ptr<AudioManager> audio_manager(AudioManager::Create()); |
if (!CanRunAudioTests(audio_manager.get())) |
return; |
@@ -475,7 +486,7 @@ TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestPacketSizeInSamples) { |
aos->Close(); |
} |
-TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestMono) { |
+TEST(WASAPIAudioOutputStreamTest, Mono) { |
scoped_ptr<AudioManager> audio_manager(AudioManager::Create()); |
if (!CanRunAudioTests(audio_manager.get())) |
return; |
@@ -525,7 +536,7 @@ TEST(WinAudioOutputTest, WASAPIAudioOutputStreamTestMono) { |
// with --gtest_also_run_disabled_tests or set the GTEST_ALSO_RUN_DISABLED_TESTS |
// environment variable to a value greater than 0. |
// The test files are approximately 20 seconds long. |
-TEST(WinAudioOutputTest, DISABLED_WASAPIAudioOutputStreamReadFromFile) { |
+TEST(WASAPIAudioOutputStreamTest, DISABLED_ReadFromFile) { |
scoped_ptr<AudioManager> audio_manager(AudioManager::Create()); |
if (!CanRunAudioTests(audio_manager.get())) |
return; |
@@ -573,7 +584,7 @@ TEST(WinAudioOutputTest, DISABLED_WASAPIAudioOutputStreamReadFromFile) { |
// certain set of audio parameters and a sample rate of 48kHz. |
// The expected outcomes of each setting in this test has been derived |
// manually using log outputs (--v=1). |
-TEST(WinAudioOutputTest, WASAPIExclusiveModeBufferSizesAt48kHz) { |
+TEST(WASAPIAudioOutputStreamTest, ExclusiveModeBufferSizesAt48kHz) { |
if (!ExclusiveModeIsEnabled()) |
return; |
@@ -624,7 +635,7 @@ TEST(WinAudioOutputTest, WASAPIExclusiveModeBufferSizesAt48kHz) { |
// certain set of audio parameters and a sample rate of 44.1kHz. |
// The expected outcomes of each setting in this test has been derived |
// manually using log outputs (--v=1). |
-TEST(WinAudioOutputTest, WASAPIExclusiveModeBufferSizesAt44kHz) { |
+TEST(WASAPIAudioOutputStreamTest, ExclusiveModeBufferSizesAt44kHz) { |
if (!ExclusiveModeIsEnabled()) |
return; |
@@ -682,7 +693,7 @@ TEST(WinAudioOutputTest, WASAPIExclusiveModeBufferSizesAt44kHz) { |
// Verify that we can open and start the output stream in exclusive mode at |
// the lowest possible delay at 48kHz. |
-TEST(WinAudioOutputTest, WASAPIExclusiveModeMinBufferSizeAt48kHz) { |
+TEST(WASAPIAudioOutputStreamTest, ExclusiveModeMinBufferSizeAt48kHz) { |
if (!ExclusiveModeIsEnabled()) |
return; |
@@ -724,7 +735,7 @@ TEST(WinAudioOutputTest, WASAPIExclusiveModeMinBufferSizeAt48kHz) { |
// Verify that we can open and start the output stream in exclusive mode at |
// the lowest possible delay at 44.1kHz. |
-TEST(WinAudioOutputTest, WASAPIExclusiveModeMinBufferSizeAt44kHz) { |
+TEST(WASAPIAudioOutputStreamTest, ExclusiveModeMinBufferSizeAt44kHz) { |
if (!ExclusiveModeIsEnabled()) |
return; |