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 { |
| 13 |
12 struct MEDIA_EXPORT AudioInputBufferParameters { | 14 struct MEDIA_EXPORT AudioInputBufferParameters { |
13 double volume; | 15 double volume; |
14 uint32 size; | 16 uint32 size; |
15 }; | 17 }; |
16 | 18 |
17 // 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 |
18 // size as sizeof(AudioInputBufferParameters) + #(bytes in audio buffer) without | 20 // size as sizeof(AudioInputBufferParameters) + #(bytes in audio buffer) without |
19 // using packing. | 21 // using packing. |
20 struct MEDIA_EXPORT AudioInputBuffer { | 22 struct MEDIA_EXPORT AudioInputBuffer { |
21 AudioInputBufferParameters params; | 23 AudioInputBufferParameters params; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 Format format_; // Format of the stream. | 78 Format format_; // Format of the stream. |
77 ChannelLayout channel_layout_; // Order of surround sound channels. | 79 ChannelLayout channel_layout_; // Order of surround sound channels. |
78 int sample_rate_; // Sampling frequency/rate. | 80 int sample_rate_; // Sampling frequency/rate. |
79 int bits_per_sample_; // Number of bits per sample. | 81 int bits_per_sample_; // Number of bits per sample. |
80 int frames_per_buffer_; // Number of frames in a buffer. | 82 int frames_per_buffer_; // Number of frames in a buffer. |
81 | 83 |
82 int channels_; // Number of channels. Value set based on | 84 int channels_; // Number of channels. Value set based on |
83 // |channel_layout|. | 85 // |channel_layout|. |
84 }; | 86 }; |
85 | 87 |
| 88 } // namespace media |
| 89 |
86 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ | 90 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ |
OLD | NEW |