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 #ifndef WEBRTC_AUDIO_TYPING_NOISE_OBSERVER_H_ |
| 12 #define WEBRTC_AUDIO_TYPING_NOISE_OBSERVER_H_ |
| 13 |
| 14 #include "webrtc/base/constructormagic.h" |
| 15 #include "webrtc/voice_engine/include/voe_base.h" |
| 16 |
| 17 namespace webrtc { |
| 18 namespace internal { |
| 19 |
| 20 // TODO(solenberg): Class comment + unit test. |
| 21 class TypingNoiseObserver final : public webrtc::VoiceEngineObserver { |
| 22 public: |
| 23 TypingNoiseObserver() {} |
| 24 |
| 25 bool typing_noise_detected() const { return typing_noise_detected_; } |
| 26 |
| 27 private: |
| 28 // webrtc::VoiceEngineObserver implementation. |
| 29 void CallbackOnError(int channel_id, int err_code) override; |
| 30 |
| 31 // TODO(solenberg): I don't actually think it is worth adding a crit sect in |
| 32 // this case, but reviewer may think differently... |
| 33 // rtc::CriticalSection crit_sect_; |
| 34 volatile bool typing_noise_detected_ = false; |
| 35 |
| 36 RTC_DISALLOW_COPY_AND_ASSIGN(TypingNoiseObserver); |
| 37 }; |
| 38 } // namespace internal |
| 39 } // namespace webrtc |
| 40 |
| 41 #endif // WEBRTC_AUDIO_TYPING_NOISE_OBSERVER_H_ |
OLD | NEW |