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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 kAudioCDSampleRate = 44100, | 46 kAudioCDSampleRate = 44100, |
47 }; | 47 }; |
48 | 48 |
49 // Bitmasks to determine whether certain platform (typically hardware) audio | 49 // Bitmasks to determine whether certain platform (typically hardware) audio |
50 // effects should be enabled. | 50 // effects should be enabled. |
51 enum PlatformEffectsMask { | 51 enum PlatformEffectsMask { |
52 NO_EFFECTS = 0x0, | 52 NO_EFFECTS = 0x0, |
53 ECHO_CANCELLER = 0x1, | 53 ECHO_CANCELLER = 0x1, |
54 DUCKING = 0x2, // Enables ducking if the OS supports it. | 54 DUCKING = 0x2, // Enables ducking if the OS supports it. |
55 KEYBOARD_MIC = 0x4, | 55 KEYBOARD_MIC = 0x4, |
| 56 HOTWORD = 0x8, |
56 }; | 57 }; |
57 | 58 |
58 AudioParameters(); | 59 AudioParameters(); |
59 AudioParameters(Format format, ChannelLayout channel_layout, | 60 AudioParameters(Format format, ChannelLayout channel_layout, |
60 int sample_rate, int bits_per_sample, | 61 int sample_rate, int bits_per_sample, |
61 int frames_per_buffer); | 62 int frames_per_buffer); |
62 AudioParameters(Format format, ChannelLayout channel_layout, | 63 AudioParameters(Format format, ChannelLayout channel_layout, |
63 int sample_rate, int bits_per_sample, | 64 int sample_rate, int bits_per_sample, |
64 int frames_per_buffer, int effects); | 65 int frames_per_buffer, int effects); |
65 AudioParameters(Format format, ChannelLayout channel_layout, | 66 AudioParameters(Format format, ChannelLayout channel_layout, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 if (a.sample_rate() != b.sample_rate()) | 126 if (a.sample_rate() != b.sample_rate()) |
126 return a.sample_rate() < b.sample_rate(); | 127 return a.sample_rate() < b.sample_rate(); |
127 if (a.bits_per_sample() != b.bits_per_sample()) | 128 if (a.bits_per_sample() != b.bits_per_sample()) |
128 return a.bits_per_sample() < b.bits_per_sample(); | 129 return a.bits_per_sample() < b.bits_per_sample(); |
129 return a.frames_per_buffer() < b.frames_per_buffer(); | 130 return a.frames_per_buffer() < b.frames_per_buffer(); |
130 } | 131 } |
131 | 132 |
132 } // namespace media | 133 } // namespace media |
133 | 134 |
134 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ | 135 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ |
OLD | NEW |