| 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 "media/base/channel_layout.h" | 9 #include "media/base/channel_layout.h" |
| 10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 AudioInputBufferParameters params; | 23 AudioInputBufferParameters params; |
| 24 int8 audio[1]; | 24 int8 audio[1]; |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 class MEDIA_EXPORT AudioParameters { | 27 class MEDIA_EXPORT AudioParameters { |
| 28 public: | 28 public: |
| 29 enum Format { | 29 enum Format { |
| 30 AUDIO_PCM_LINEAR = 0, // PCM is 'raw' amplitude samples. | 30 AUDIO_PCM_LINEAR = 0, // PCM is 'raw' amplitude samples. |
| 31 AUDIO_PCM_LOW_LATENCY, // Linear PCM, low latency requested. | 31 AUDIO_PCM_LOW_LATENCY, // Linear PCM, low latency requested. |
| 32 AUDIO_FAKE, // Creates a fake AudioOutputStream object. | 32 AUDIO_FAKE, // Creates a fake AudioOutputStream object. |
| 33 AUDIO_LAST_FORMAT // Only used for validation of format. | 33 AUDIO_MIRROR_BROWSER, // Audio streams from the entire browser. |
| 34 AUDIO_LAST_FORMAT, // Only used for validation of format. |
| 34 }; | 35 }; |
| 35 | 36 |
| 36 enum { | 37 enum { |
| 37 // Telephone quality sample rate, mostly for speech-only audio. | 38 // Telephone quality sample rate, mostly for speech-only audio. |
| 38 kTelephoneSampleRate = 8000, | 39 kTelephoneSampleRate = 8000, |
| 39 // CD sampling rate is 44.1 KHz or conveniently 2x2x3x3x5x5x7x7. | 40 // CD sampling rate is 44.1 KHz or conveniently 2x2x3x3x5x5x7x7. |
| 40 kAudioCDSampleRate = 44100, | 41 kAudioCDSampleRate = 44100, |
| 41 }; | 42 }; |
| 42 | 43 |
| 43 AudioParameters(); | 44 AudioParameters(); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 if (a.sample_rate() != b.sample_rate()) | 89 if (a.sample_rate() != b.sample_rate()) |
| 89 return a.sample_rate() < b.sample_rate(); | 90 return a.sample_rate() < b.sample_rate(); |
| 90 if (a.bits_per_sample() != b.bits_per_sample()) | 91 if (a.bits_per_sample() != b.bits_per_sample()) |
| 91 return a.bits_per_sample() < b.bits_per_sample(); | 92 return a.bits_per_sample() < b.bits_per_sample(); |
| 92 return a.frames_per_buffer() < b.frames_per_buffer(); | 93 return a.frames_per_buffer() < b.frames_per_buffer(); |
| 93 } | 94 } |
| 94 | 95 |
| 95 } // namespace media | 96 } // namespace media |
| 96 | 97 |
| 97 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ | 98 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ |
| OLD | NEW |