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 #pragma pack(push, 1) | |
tommi (sloooow) - chröme
2012/03/16 13:31:05
Can you add a note why we set the packing to 1?
A
henrika (OOO until Aug 14)
2012/03/21 10:16:04
Done.
| |
13 struct MEDIA_EXPORT AudioInputBuffer { | |
14 double volume; | |
15 uint32 size; | |
16 int8 audio[1]; | |
17 | |
18 static const int kSizeOfStructMinusArr; | |
19 }; | |
20 #pragma pack(pop) | |
21 | |
12 // TODO(vrk): This should probably be changed to an immutable object instead of | 22 // TODO(vrk): This should probably be changed to an immutable object instead of |
13 // a struct. See crbug.com/115902. | 23 // a struct. See crbug.com/115902. |
14 struct MEDIA_EXPORT AudioParameters { | 24 struct MEDIA_EXPORT AudioParameters { |
15 // Compare is useful when AudioParameters is used as a key in std::map. | 25 // Compare is useful when AudioParameters is used as a key in std::map. |
16 class MEDIA_EXPORT Compare { | 26 class MEDIA_EXPORT Compare { |
17 public: | 27 public: |
18 bool operator()(const AudioParameters& a, const AudioParameters& b) const; | 28 bool operator()(const AudioParameters& a, const AudioParameters& b) const; |
19 }; | 29 }; |
20 | 30 |
21 enum Format { | 31 enum Format { |
(...skipping 28 matching lines...) Expand all Loading... | |
50 ChannelLayout channel_layout; // Order of surround sound channels. | 60 ChannelLayout channel_layout; // Order of surround sound channels. |
51 int sample_rate; // Sampling frequency/rate. | 61 int sample_rate; // Sampling frequency/rate. |
52 int bits_per_sample; // Number of bits per sample. | 62 int bits_per_sample; // Number of bits per sample. |
53 int samples_per_packet; // Size of a packet in frames. | 63 int samples_per_packet; // Size of a packet in frames. |
54 | 64 |
55 int channels; // Number of channels. Value set based on | 65 int channels; // Number of channels. Value set based on |
56 // |channel_layout|. | 66 // |channel_layout|. |
57 }; | 67 }; |
58 | 68 |
59 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ | 69 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ |
OLD | NEW |