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

Side by Side Diff: webrtc/tools/agc/fake_agc.h

Issue 2057533002: Delete some unused header files. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 months 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/modules/video_coding/test/release_test.h ('k') | no next file » | 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) 2012 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_TOOLS_AGC_FAKE_AGC_H_
12 #define WEBRTC_TOOLS_AGC_FAKE_AGC_H_
13
14 #include "webrtc/modules/audio_processing/agc/agc.h"
15
16 namespace webrtc {
17
18 class FakeAgc : public Agc {
19 public:
20 FakeAgc()
21 : counter_(0),
22 volume_(kMaxVolume / 2) {
23 }
24
25 virtual int Process(const AudioFrame& audio_frame) {
26 const int kUpdateIntervalFrames = 10;
27 const int kMaxVolume = 255;
28 if (counter_ % kUpdateIntervalFrames == 0) {
29 volume_ = (++volume_) % kMaxVolume;
30 }
31 counter_++;
32 return 0;
33 }
34
35 virtual int FakeAgc::MicVolume() {
36 return volume_;
37 }
38
39 private:
40 int counter_;
41 int volume_;
42 };
43
44 } // namespace webrtc
45
46 #endif // WEBRTC_TOOLS_AGC_FAKE_AGC_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/test/release_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698