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

Unified Diff: media/base/channel_mixer_unittest.cc

Issue 672793002: Expose the internal MatrixBuilder class as ChannelMixingMatrix. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test output_layout up to MAX. Use EXPECT_FLOAT_EQ. Created 6 years, 2 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 | « media/base/channel_mixer.cc ('k') | media/base/channel_mixing_matrix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/channel_mixer_unittest.cc
diff --git a/media/base/channel_mixer_unittest.cc b/media/base/channel_mixer_unittest.cc
index ac228e661dd39bb5869b4e98ddafa624807cdc4a..e818928f80eee8508885661ba07cb12b56fe5b81 100644
--- a/media/base/channel_mixer_unittest.cc
+++ b/media/base/channel_mixer_unittest.cc
@@ -24,14 +24,16 @@ TEST(ChannelMixerTest, ConstructAllPossibleLayouts) {
input_layout <= CHANNEL_LAYOUT_MAX;
input_layout = static_cast<ChannelLayout>(input_layout + 1)) {
for (ChannelLayout output_layout = CHANNEL_LAYOUT_MONO;
- output_layout < CHANNEL_LAYOUT_STEREO_DOWNMIX;
+ output_layout <= CHANNEL_LAYOUT_MAX;
output_layout = static_cast<ChannelLayout>(output_layout + 1)) {
// DISCRETE can't be tested here based on the current approach.
// CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC is not mixable.
+ // Stereo down mix should never be the output layout.
if (input_layout == CHANNEL_LAYOUT_DISCRETE ||
input_layout == CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC ||
output_layout == CHANNEL_LAYOUT_DISCRETE ||
- output_layout == CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC) {
+ output_layout == CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC ||
+ output_layout == CHANNEL_LAYOUT_STEREO_DOWNMIX) {
continue;
}
« no previous file with comments | « media/base/channel_mixer.cc ('k') | media/base/channel_mixing_matrix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698