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 "content/browser/speech/speech_recognizer_impl.h" | 5 #include "content/browser/speech/speech_recognizer_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 bool data_was_converted() const { return data_was_converted_; } | 48 bool data_was_converted() const { return data_was_converted_; } |
49 | 49 |
50 private: | 50 private: |
51 // media::AudioConverter::InputCallback implementation. | 51 // media::AudioConverter::InputCallback implementation. |
52 double ProvideInput(AudioBus* dest, base::TimeDelta buffer_delay) override; | 52 double ProvideInput(AudioBus* dest, base::TimeDelta buffer_delay) override; |
53 | 53 |
54 // Handles resampling, buffering, and channel mixing between input and output | 54 // Handles resampling, buffering, and channel mixing between input and output |
55 // parameters. | 55 // parameters. |
56 AudioConverter audio_converter_; | 56 AudioConverter audio_converter_; |
57 | 57 |
58 scoped_ptr<AudioBus> input_bus_; | 58 std::unique_ptr<AudioBus> input_bus_; |
59 scoped_ptr<AudioBus> output_bus_; | 59 std::unique_ptr<AudioBus> output_bus_; |
60 const AudioParameters input_parameters_; | 60 const AudioParameters input_parameters_; |
61 const AudioParameters output_parameters_; | 61 const AudioParameters output_parameters_; |
62 bool data_was_converted_; | 62 bool data_was_converted_; |
63 | 63 |
64 DISALLOW_COPY_AND_ASSIGN(OnDataConverter); | 64 DISALLOW_COPY_AND_ASSIGN(OnDataConverter); |
65 }; | 65 }; |
66 | 66 |
67 namespace { | 67 namespace { |
68 | 68 |
69 // The following constants are related to the volume level indicator shown in | 69 // The following constants are related to the volume level indicator shown in |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 engine_error(SPEECH_RECOGNITION_ERROR_NONE) { | 836 engine_error(SPEECH_RECOGNITION_ERROR_NONE) { |
837 } | 837 } |
838 | 838 |
839 SpeechRecognizerImpl::FSMEventArgs::FSMEventArgs(const FSMEventArgs& other) = | 839 SpeechRecognizerImpl::FSMEventArgs::FSMEventArgs(const FSMEventArgs& other) = |
840 default; | 840 default; |
841 | 841 |
842 SpeechRecognizerImpl::FSMEventArgs::~FSMEventArgs() { | 842 SpeechRecognizerImpl::FSMEventArgs::~FSMEventArgs() { |
843 } | 843 } |
844 | 844 |
845 } // namespace content | 845 } // namespace content |
OLD | NEW |