| Index: webrtc/audio/typing_noise_observer.h
|
| diff --git a/webrtc/audio/typing_noise_observer.h b/webrtc/audio/typing_noise_observer.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1809734e12312b932ccaddf67451fdff9868ec25
|
| --- /dev/null
|
| +++ b/webrtc/audio/typing_noise_observer.h
|
| @@ -0,0 +1,41 @@
|
| +/*
|
| + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license
|
| + * that can be found in the LICENSE file in the root of the source
|
| + * tree. An additional intellectual property rights grant can be found
|
| + * in the file PATENTS. All contributing project authors may
|
| + * be found in the AUTHORS file in the root of the source tree.
|
| + */
|
| +
|
| +#ifndef WEBRTC_AUDIO_TYPING_NOISE_OBSERVER_H_
|
| +#define WEBRTC_AUDIO_TYPING_NOISE_OBSERVER_H_
|
| +
|
| +#include "webrtc/base/constructormagic.h"
|
| +#include "webrtc/voice_engine/include/voe_base.h"
|
| +
|
| +namespace webrtc {
|
| +namespace internal {
|
| +
|
| +// TODO(solenberg): Class comment + unit test.
|
| +class TypingNoiseObserver final : public webrtc::VoiceEngineObserver {
|
| + public:
|
| + TypingNoiseObserver() {}
|
| +
|
| + bool typing_noise_detected() const { return typing_noise_detected_; }
|
| +
|
| + private:
|
| + // webrtc::VoiceEngineObserver implementation.
|
| + void CallbackOnError(int channel_id, int err_code) override;
|
| +
|
| + // TODO(solenberg): I don't actually think it is worth adding a crit sect in
|
| + // this case, but reviewer may think differently...
|
| + // rtc::CriticalSection crit_sect_;
|
| + volatile bool typing_noise_detected_ = false;
|
| +
|
| + RTC_DISALLOW_COPY_AND_ASSIGN(TypingNoiseObserver);
|
| +};
|
| +} // namespace internal
|
| +} // namespace webrtc
|
| +
|
| +#endif // WEBRTC_AUDIO_TYPING_NOISE_OBSERVER_H_
|
|
|