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