OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_AUDIO_AUDIO_PARAMETERS_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_PARAMETERS_H_ |
6 #define MEDIA_AUDIO_AUDIO_PARAMETERS_H_ | 6 #define MEDIA_AUDIO_AUDIO_PARAMETERS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 }; | 83 }; |
84 | 84 |
85 // Bitmasks to determine whether certain platform (typically hardware) audio | 85 // Bitmasks to determine whether certain platform (typically hardware) audio |
86 // effects should be enabled. | 86 // effects should be enabled. |
87 enum PlatformEffectsMask { | 87 enum PlatformEffectsMask { |
88 NO_EFFECTS = 0x0, | 88 NO_EFFECTS = 0x0, |
89 ECHO_CANCELLER = 0x1, | 89 ECHO_CANCELLER = 0x1, |
90 DUCKING = 0x2, // Enables ducking if the OS supports it. | 90 DUCKING = 0x2, // Enables ducking if the OS supports it. |
91 KEYBOARD_MIC = 0x4, | 91 KEYBOARD_MIC = 0x4, |
92 HOTWORD = 0x8, | 92 HOTWORD = 0x8, |
| 93 FOCUSABLE = 0x16, // Supports platform specific focus controls. |
93 }; | 94 }; |
94 | 95 |
95 AudioParameters(); | 96 AudioParameters(); |
96 AudioParameters(Format format, | 97 AudioParameters(Format format, |
97 ChannelLayout channel_layout, | 98 ChannelLayout channel_layout, |
98 int sample_rate, | 99 int sample_rate, |
99 int bits_per_sample, | 100 int bits_per_sample, |
100 int frames_per_buffer); | 101 int frames_per_buffer); |
101 | 102 |
102 ~AudioParameters(); | 103 ~AudioParameters(); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 if (a.sample_rate() != b.sample_rate()) | 205 if (a.sample_rate() != b.sample_rate()) |
205 return a.sample_rate() < b.sample_rate(); | 206 return a.sample_rate() < b.sample_rate(); |
206 if (a.bits_per_sample() != b.bits_per_sample()) | 207 if (a.bits_per_sample() != b.bits_per_sample()) |
207 return a.bits_per_sample() < b.bits_per_sample(); | 208 return a.bits_per_sample() < b.bits_per_sample(); |
208 return a.frames_per_buffer() < b.frames_per_buffer(); | 209 return a.frames_per_buffer() < b.frames_per_buffer(); |
209 } | 210 } |
210 | 211 |
211 } // namespace media | 212 } // namespace media |
212 | 213 |
213 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ | 214 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ |
OLD | NEW |