| 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" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 | 13 |
| 14 struct MEDIA_EXPORT AudioInputBufferParameters { | 14 struct MEDIA_EXPORT AudioInputBufferParameters { |
| 15 double volume; | 15 double volume; |
| 16 uint32 size; | 16 uint32 size; |
| 17 bool key_pressed; |
| 17 }; | 18 }; |
| 18 | 19 |
| 19 // Use a struct-in-struct approach to ensure that we can calculate the required | 20 // Use a struct-in-struct approach to ensure that we can calculate the required |
| 20 // size as sizeof(AudioInputBufferParameters) + #(bytes in audio buffer) without | 21 // size as sizeof(AudioInputBufferParameters) + #(bytes in audio buffer) without |
| 21 // using packing. | 22 // using packing. |
| 22 struct MEDIA_EXPORT AudioInputBuffer { | 23 struct MEDIA_EXPORT AudioInputBuffer { |
| 23 AudioInputBufferParameters params; | 24 AudioInputBufferParameters params; |
| 24 int8 audio[1]; | 25 int8 audio[1]; |
| 25 }; | 26 }; |
| 26 | 27 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 if (a.sample_rate() != b.sample_rate()) | 115 if (a.sample_rate() != b.sample_rate()) |
| 115 return a.sample_rate() < b.sample_rate(); | 116 return a.sample_rate() < b.sample_rate(); |
| 116 if (a.bits_per_sample() != b.bits_per_sample()) | 117 if (a.bits_per_sample() != b.bits_per_sample()) |
| 117 return a.bits_per_sample() < b.bits_per_sample(); | 118 return a.bits_per_sample() < b.bits_per_sample(); |
| 118 return a.frames_per_buffer() < b.frames_per_buffer(); | 119 return a.frames_per_buffer() < b.frames_per_buffer(); |
| 119 } | 120 } |
| 120 | 121 |
| 121 } // namespace media | 122 } // namespace media |
| 122 | 123 |
| 123 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ | 124 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ |
| OLD | NEW |