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

Side by Side Diff: chromecast/media/cma/backend/alsa/volume_map.h

Issue 2958393002: Add a simple, safe gain PostProcessor. (Closed)
Patch Set: Unrelated cleanup Created 3 years, 5 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 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_ALSA_VOLUME_MAP_H_
6 #define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_VOLUME_MAP_H_
7
8 #include <vector>
9
10 #include "base/macros.h"
11
12 namespace chromecast {
13 namespace media {
14
15 class VolumeMap {
16 public:
17 VolumeMap();
18 ~VolumeMap();
19
20 float VolumeToDbFS(float volume);
21
22 float DbFSToVolume(float db);
23
24 private:
25 struct LevelToDb {
26 float level;
27 float db;
28 };
29
30 void UseDefaultVolumeMap();
31
32 std::vector<LevelToDb> volume_map_;
33
34 DISALLOW_COPY_AND_ASSIGN(VolumeMap);
35 };
36
37 } // namespace media
38 } // namespace chromecast
39
40 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_VOLUME_MAP_H_
OLDNEW
« no previous file with comments | « chromecast/media/cma/backend/alsa/volume_control.cc ('k') | chromecast/media/cma/backend/alsa/volume_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698