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

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

Issue 2958393002: Add a simple, safe gain PostProcessor. (Closed)
Patch Set: Move cast_audio.json filepath string to a separate file 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 struct LevelToDb {
kmackay 2017/06/30 20:57:58 Does this need to be exposed (ie, could it be priv
bshaya 2017/07/06 21:04:45 Done.
16 float level;
17 float db;
18 };
19
20 class VolumeMap {
21 public:
22 VolumeMap();
23 ~VolumeMap();
24
25 float VolumeToDbFS(float volume);
26
27 float DbFSToVolume(float db);
28
29 private:
30 std::vector<LevelToDb> volume_map_;
31
32 DISALLOW_COPY_AND_ASSIGN(VolumeMap);
33 };
34
35 } // namespace media
36 } // namespace chromecast
37
38 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_VOLUME_MAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698