OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/renderer/media/speech_recognition_audio_sink.h" | 5 #include "content/renderer/media/speech_recognition_audio_sink.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string.h> |
9 | 10 |
10 #include "base/bind.h" | 11 #include "base/bind.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
13 #include "content/renderer/media/media_stream_audio_source.h" | 14 #include "content/renderer/media/media_stream_audio_source.h" |
14 #include "content/renderer/media/mock_media_constraint_factory.h" | 15 #include "content/renderer/media/mock_media_constraint_factory.h" |
15 #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h" | 16 #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h" |
16 #include "content/renderer/media/webrtc_local_audio_track.h" | 17 #include "content/renderer/media/webrtc_local_audio_track.h" |
17 #include "media/audio/audio_parameters.h" | 18 #include "media/audio/audio_parameters.h" |
18 #include "media/base/audio_bus.h" | 19 #include "media/base/audio_bus.h" |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 const uint32_t buffers_per_notification = Initialize(44100, 441, 16000, 1600); | 527 const uint32_t buffers_per_notification = Initialize(44100, 441, 16000, 1600); |
527 AssertConsumedBuffers(0U); | 528 AssertConsumedBuffers(0U); |
528 CaptureAudioAndAssertConsumedBuffers(buffers_per_notification, 1U); | 529 CaptureAudioAndAssertConsumedBuffers(buffers_per_notification, 1U); |
529 EXPECT_CALL(*this, StoppedCallback()).Times(1); | 530 EXPECT_CALL(*this, StoppedCallback()).Times(1); |
530 | 531 |
531 native_track()->Stop(); | 532 native_track()->Stop(); |
532 CaptureAudioAndAssertConsumedBuffers(buffers_per_notification, 1U); | 533 CaptureAudioAndAssertConsumedBuffers(buffers_per_notification, 1U); |
533 } | 534 } |
534 | 535 |
535 } // namespace content | 536 } // namespace content |
OLD | NEW |