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

Side by Side Diff: webrtc/modules/audio_processing/test/analog_volume_mapper_unittest.cc

Issue 2837553002: First try on a fake analog volume control interface for use in audioproc_f. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2017 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/modules/audio_processing/test/identity_analog_volume_mapper.h"
12 #include "webrtc/test/gtest.h"
13
aleloi 2017/04/21 09:39:14 The idea is to submit all subclasses of the Volume
AleBzk 2017/04/21 10:35:49 Acknowledged.
14 TEST(AnalogVolumeMapper, GainCurveShouldBeMonotone) {
15 webrtc::IdentityAnalogLevelMapper level_mapper;
16 float last_level = level_mapper.get_scaling_factor();
17 RTC_DCHECK_LE(0.f, last_level);
18
19 for (int i = 0; i < 65535; ++i) {
20 level_mapper.set_analog_level(i);
21 const float current_level = level_mapper.get_scaling_factor();
22 RTC_DCHECK_LE(last_level, current_level);
23
24 last_level = current_level;
25 }
26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698