OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/audio/audio_silence_detector.h" | 5 #include "media/audio/audio_silence_detector.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
11 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
12 #include "base/time.h" | 12 #include "base/time/time.h" |
13 #include "media/base/audio_bus.h" | 13 #include "media/base/audio_bus.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 using ::testing::_; | 17 using ::testing::_; |
18 using ::testing::InvokeWithoutArgs; | 18 using ::testing::InvokeWithoutArgs; |
19 using ::testing::TestWithParam; | 19 using ::testing::TestWithParam; |
20 using ::testing::Values; | 20 using ::testing::Values; |
21 | 21 |
22 namespace media { | 22 namespace media { |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 INSTANTIATE_TEST_CASE_P( | 218 INSTANTIATE_TEST_CASE_P( |
219 Scenarios, AudioSilenceDetectorTest, | 219 Scenarios, AudioSilenceDetectorTest, |
220 Values( | 220 Values( |
221 TestScenario(kAllZeros, 2, 1, 0.0f), | 221 TestScenario(kAllZeros, 2, 1, 0.0f), |
222 TestScenario(kAllOnes, 2, 1, 0.0f), | 222 TestScenario(kAllOnes, 2, 1, 0.0f), |
223 TestScenario(kSilentLeftChannel, 2, 4, 0.25f), | 223 TestScenario(kSilentLeftChannel, 2, 4, 0.25f), |
224 TestScenario(kSilentRightChannel, 2, 5, 0.5f), | 224 TestScenario(kSilentRightChannel, 2, 5, 0.5f), |
225 TestScenario(kAtDifferentVolumesAndBias, 2, 12, 0.6f))); | 225 TestScenario(kAtDifferentVolumesAndBias, 2, 12, 0.6f))); |
226 | 226 |
227 } // namespace media | 227 } // namespace media |
OLD | NEW |