| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> |
| 6 |
| 5 #include <map> | 7 #include <map> |
| 6 | 8 |
| 7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/rand_util.h" | 11 #include "base/rand_util.h" |
| 10 #include "content/renderer/media/audio_repetition_detector.h" | 12 #include "content/renderer/media/audio_repetition_detector.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 14 |
| 13 namespace content { | 15 namespace content { |
| 14 | 16 |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 // We only expect a repetition with 100 ms look back time. | 347 // We only expect a repetition with 100 ms look back time. |
| 346 expect_counts[2].count = 1; | 348 expect_counts[2].count = 1; |
| 347 | 349 |
| 348 SetDetector(kDefaultMinLengthMs, kDefaultMaxFrames, kLookbackTimes, | 350 SetDetector(kDefaultMinLengthMs, kDefaultMaxFrames, kLookbackTimes, |
| 349 arraysize(kLookbackTimes)); | 351 arraysize(kLookbackTimes)); |
| 350 Verify(expect_counts, arraysize(expect_counts), test_signal, kSamples, | 352 Verify(expect_counts, arraysize(expect_counts), test_signal, kSamples, |
| 351 kNormalSampleRateHz); | 353 kNormalSampleRateHz); |
| 352 } | 354 } |
| 353 | 355 |
| 354 } // namespace content | 356 } // namespace content |
| OLD | NEW |