| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 int VoiceDetectionImpl::InitializeHandle(void* handle) const { | 158 int VoiceDetectionImpl::InitializeHandle(void* handle) const { |
| 159 return WebRtcVad_Init(static_cast<Handle*>(handle)); | 159 return WebRtcVad_Init(static_cast<Handle*>(handle)); |
| 160 } | 160 } |
| 161 | 161 |
| 162 int VoiceDetectionImpl::ConfigureHandle(void* handle) const { | 162 int VoiceDetectionImpl::ConfigureHandle(void* handle) const { |
| 163 return WebRtcVad_set_mode(static_cast<Handle*>(handle), | 163 return WebRtcVad_set_mode(static_cast<Handle*>(handle), |
| 164 MapSetting(likelihood_)); | 164 MapSetting(likelihood_)); |
| 165 } | 165 } |
| 166 | 166 |
| 167 int VoiceDetectionImpl::num_handles_required() const { | 167 size_t VoiceDetectionImpl::num_handles_required() const { |
| 168 return 1; | 168 return 1; |
| 169 } | 169 } |
| 170 | 170 |
| 171 int VoiceDetectionImpl::GetHandleError(void* handle) const { | 171 int VoiceDetectionImpl::GetHandleError(void* handle) const { |
| 172 // The VAD has no get_error() function. | 172 // The VAD has no get_error() function. |
| 173 assert(handle != NULL); | 173 assert(handle != NULL); |
| 174 return apm_->kUnspecifiedError; | 174 return apm_->kUnspecifiedError; |
| 175 } | 175 } |
| 176 } // namespace webrtc | 176 } // namespace webrtc |
| OLD | NEW |