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> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
9 #include "base/time/time.h" | 11 #include "base/time/time.h" |
10 #include "content/renderer/media/media_stream_audio_source.h" | 12 #include "content/renderer/media/media_stream_audio_source.h" |
11 #include "media/audio/audio_parameters.h" | 13 #include "media/audio/audio_parameters.h" |
12 #include "media/base/audio_fifo.h" | 14 #include "media/base/audio_fifo.h" |
13 | 15 |
14 namespace content { | 16 namespace content { |
15 | 17 |
16 SpeechRecognitionAudioSink::SpeechRecognitionAudioSink( | 18 SpeechRecognitionAudioSink::SpeechRecognitionAudioSink( |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 } | 176 } |
175 | 177 |
176 media::AudioInputBuffer* | 178 media::AudioInputBuffer* |
177 SpeechRecognitionAudioSink::GetAudioInputBuffer() const { | 179 SpeechRecognitionAudioSink::GetAudioInputBuffer() const { |
178 DCHECK(capture_thread_checker_.CalledOnValidThread()); | 180 DCHECK(capture_thread_checker_.CalledOnValidThread()); |
179 DCHECK(shared_memory_.memory()); | 181 DCHECK(shared_memory_.memory()); |
180 return static_cast<media::AudioInputBuffer*>(shared_memory_.memory()); | 182 return static_cast<media::AudioInputBuffer*>(shared_memory_.memory()); |
181 } | 183 } |
182 | 184 |
183 } // namespace content | 185 } // namespace content |
OLD | NEW |