OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 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 |
| 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ |
| 10 |
| 11 #include "webrtc/audio/typing_noise_observer.h" |
| 12 |
| 13 #include "webrtc/base/checks.h" |
| 14 #include "webrtc/base/logging.h" |
| 15 #include "webrtc/voice_engine/include/voe_errors.h" |
| 16 |
| 17 namespace webrtc { |
| 18 namespace internal { |
| 19 |
| 20 void TypingNoiseObserver::CallbackOnError(int channel_id, int err_code) { |
| 21 // All call sites in VoE, as of this writing, specify -1 as channel_id. |
| 22 RTC_DCHECK(channel_id == -1); |
| 23 LOG(LS_INFO) << "VoiceEngine error " << err_code << " reported on channel " |
| 24 << channel_id << "."; |
| 25 if (err_code == VE_TYPING_NOISE_WARNING) { |
| 26 typing_noise_detected_ = true; |
| 27 } else if (err_code == VE_TYPING_NOISE_OFF_WARNING) { |
| 28 typing_noise_detected_ = false; |
| 29 } |
| 30 } |
| 31 } // namespace internal |
| 32 } // namespace webrtc |
OLD | NEW |