OLD | NEW |
---|---|
(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_ | |
OLD | NEW |