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 "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "media/base/channel_layout.h" | 10 #include "media/base/channel_layout.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 | 87 |
88 Format format() const { return format_; } | 88 Format format() const { return format_; } |
89 ChannelLayout channel_layout() const { return channel_layout_; } | 89 ChannelLayout channel_layout() const { return channel_layout_; } |
90 int sample_rate() const { return sample_rate_; } | 90 int sample_rate() const { return sample_rate_; } |
91 int bits_per_sample() const { return bits_per_sample_; } | 91 int bits_per_sample() const { return bits_per_sample_; } |
92 int frames_per_buffer() const { return frames_per_buffer_; } | 92 int frames_per_buffer() const { return frames_per_buffer_; } |
93 int channels() const { return channels_; } | 93 int channels() const { return channels_; } |
94 int effects() const { return effects_; } | 94 int effects() const { return effects_; } |
95 | 95 |
96 // Comparison with other AudioParams. | 96 // Comparison with other AudioParams. |
97 bool operator==(const AudioParameters& other) const { | 97 bool Equals(const AudioParameters& other) const { |
DaleCurtis
2014/09/22 21:30:24
Move into class now that it's no longer hacker sty
| |
98 return format_ == other.format() && | 98 return format_ == other.format() && |
99 sample_rate_ == other.sample_rate() && | 99 sample_rate_ == other.sample_rate() && |
100 channel_layout_ == other.channel_layout() && | 100 channel_layout_ == other.channel_layout() && |
101 channels_ == other.channels() && | 101 channels_ == other.channels() && |
102 bits_per_sample_ == other.bits_per_sample() && | 102 bits_per_sample_ == other.bits_per_sample() && |
103 frames_per_buffer_ == other.frames_per_buffer() && | 103 frames_per_buffer_ == other.frames_per_buffer() && |
104 effects_ == other.effects(); | 104 effects_ == other.effects(); |
105 } | 105 } |
106 | 106 |
107 private: | 107 private: |
(...skipping 19 matching lines...) Expand all Loading... | |
127 if (a.sample_rate() != b.sample_rate()) | 127 if (a.sample_rate() != b.sample_rate()) |
128 return a.sample_rate() < b.sample_rate(); | 128 return a.sample_rate() < b.sample_rate(); |
129 if (a.bits_per_sample() != b.bits_per_sample()) | 129 if (a.bits_per_sample() != b.bits_per_sample()) |
130 return a.bits_per_sample() < b.bits_per_sample(); | 130 return a.bits_per_sample() < b.bits_per_sample(); |
131 return a.frames_per_buffer() < b.frames_per_buffer(); | 131 return a.frames_per_buffer() < b.frames_per_buffer(); |
132 } | 132 } |
133 | 133 |
134 } // namespace media | 134 } // namespace media |
135 | 135 |
136 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ | 136 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ |
OLD | NEW |