Chromium Code Reviews| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "media/base/channel_layout.h" | 10 #include "media/base/channel_layout.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 kAudioCDSampleRate = 44100, | 44 kAudioCDSampleRate = 44100, |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 // Bitmasks to determine whether certain platform (typically hardware) audio | 47 // Bitmasks to determine whether certain platform (typically hardware) audio |
| 48 // effects should be enabled. | 48 // effects should be enabled. |
| 49 enum PlatformEffectsMask { | 49 enum PlatformEffectsMask { |
| 50 NO_EFFECTS = 0x0, | 50 NO_EFFECTS = 0x0, |
| 51 ECHO_CANCELLER = 0x1, | 51 ECHO_CANCELLER = 0x1, |
| 52 DUCKING = 0x2, // Enables ducking if the OS supports it. | 52 DUCKING = 0x2, // Enables ducking if the OS supports it. |
| 53 KEYBOARD_MIC = 0x4, | 53 KEYBOARD_MIC = 0x4, |
| 54 HARDWARE_INPUT = 0x8, | |
|
dgreid
2014/09/17 21:16:22
Can HARDWARE_INPUT have a different name? All the
rpetterson
2014/09/17 21:32:00
I'll change it to HOTWORD to mimic the callbacks.
| |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 AudioParameters(); | 57 AudioParameters(); |
| 57 AudioParameters(Format format, ChannelLayout channel_layout, | 58 AudioParameters(Format format, ChannelLayout channel_layout, |
| 58 int sample_rate, int bits_per_sample, | 59 int sample_rate, int bits_per_sample, |
| 59 int frames_per_buffer); | 60 int frames_per_buffer); |
| 60 AudioParameters(Format format, ChannelLayout channel_layout, | 61 AudioParameters(Format format, ChannelLayout channel_layout, |
| 61 int sample_rate, int bits_per_sample, | 62 int sample_rate, int bits_per_sample, |
| 62 int frames_per_buffer, int effects); | 63 int frames_per_buffer, int effects); |
| 63 AudioParameters(Format format, ChannelLayout channel_layout, | 64 AudioParameters(Format format, ChannelLayout channel_layout, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 if (a.sample_rate() != b.sample_rate()) | 128 if (a.sample_rate() != b.sample_rate()) |
| 128 return a.sample_rate() < b.sample_rate(); | 129 return a.sample_rate() < b.sample_rate(); |
| 129 if (a.bits_per_sample() != b.bits_per_sample()) | 130 if (a.bits_per_sample() != b.bits_per_sample()) |
| 130 return a.bits_per_sample() < b.bits_per_sample(); | 131 return a.bits_per_sample() < b.bits_per_sample(); |
| 131 return a.frames_per_buffer() < b.frames_per_buffer(); | 132 return a.frames_per_buffer() < b.frames_per_buffer(); |
| 132 } | 133 } |
| 133 | 134 |
| 134 } // namespace media | 135 } // namespace media |
| 135 | 136 |
| 136 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ | 137 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ |
| OLD | NEW |