| 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> |    5 #include <stddef.h> | 
|    6  |    6  | 
|    7 #include <map> |    7 #include <map> | 
|    8  |    8  | 
|    9 #include "base/bind.h" |    9 #include "base/bind.h" | 
|   10 #include "base/macros.h" |   10 #include "base/macros.h" | 
 |   11 #include "base/memory/scoped_ptr.h" | 
|   11 #include "base/rand_util.h" |   12 #include "base/rand_util.h" | 
|   12 #include "content/renderer/media/audio_repetition_detector.h" |   13 #include "content/renderer/media/audio_repetition_detector.h" | 
|   13 #include "testing/gtest/include/gtest/gtest.h" |   14 #include "testing/gtest/include/gtest/gtest.h" | 
|   14  |   15  | 
|   15 namespace content { |   16 namespace content { | 
|   16  |   17  | 
|   17 namespace { |   18 namespace { | 
|   18 const int kDefaultMinLengthMs = 1; |   19 const int kDefaultMinLengthMs = 1; | 
|   19 const size_t kDefaultMaxFrames = 480;  // 10 ms * 48 kHz |   20 const size_t kDefaultMaxFrames = 480;  // 10 ms * 48 kHz | 
|   20  |   21  | 
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  347   // We only expect a repetition with 100 ms look back time. |  348   // We only expect a repetition with 100 ms look back time. | 
|  348   expect_counts[2].count = 1; |  349   expect_counts[2].count = 1; | 
|  349  |  350  | 
|  350   SetDetector(kDefaultMinLengthMs, kDefaultMaxFrames, kLookbackTimes, |  351   SetDetector(kDefaultMinLengthMs, kDefaultMaxFrames, kLookbackTimes, | 
|  351               arraysize(kLookbackTimes)); |  352               arraysize(kLookbackTimes)); | 
|  352   Verify(expect_counts, arraysize(expect_counts), test_signal, kSamples, |  353   Verify(expect_counts, arraysize(expect_counts), test_signal, kSamples, | 
|  353          kNormalSampleRateHz); |  354          kNormalSampleRateHz); | 
|  354 } |  355 } | 
|  355  |  356  | 
|  356 }  // namespace content |  357 }  // namespace content | 
| OLD | NEW |