Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: webrtc/audio/typing_noise_observer.cc

Issue 1403363003: Move VoiceEngineObserver into AudioSendStream so that we detect typing noises and return properly i… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: more includes Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/audio/typing_noise_observer.h ('k') | webrtc/audio/voice_engines.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « webrtc/audio/typing_noise_observer.h ('k') | webrtc/audio/voice_engines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698