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 #include "media/audio/audio_parameters.h" | 5 #include "media/audio/audio_parameters.h" |
6 | 6 |
7 #include "media/base/limits.h" | 7 #include "media/base/limits.h" |
8 | 8 |
| 9 namespace media { |
| 10 |
9 AudioParameters::AudioParameters() | 11 AudioParameters::AudioParameters() |
10 : format_(AUDIO_PCM_LINEAR), | 12 : format_(AUDIO_PCM_LINEAR), |
11 channel_layout_(CHANNEL_LAYOUT_NONE), | 13 channel_layout_(CHANNEL_LAYOUT_NONE), |
12 sample_rate_(0), | 14 sample_rate_(0), |
13 bits_per_sample_(0), | 15 bits_per_sample_(0), |
14 frames_per_buffer_(0), | 16 frames_per_buffer_(0), |
15 channels_(0) { | 17 channels_(0) { |
16 } | 18 } |
17 | 19 |
18 AudioParameters::AudioParameters(Format format, ChannelLayout channel_layout, | 20 AudioParameters::AudioParameters(Format format, ChannelLayout channel_layout, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 if (a.sample_rate_ < b.sample_rate_) | 76 if (a.sample_rate_ < b.sample_rate_) |
75 return true; | 77 return true; |
76 if (a.sample_rate_ > b.sample_rate_) | 78 if (a.sample_rate_ > b.sample_rate_) |
77 return false; | 79 return false; |
78 if (a.bits_per_sample_ < b.bits_per_sample_) | 80 if (a.bits_per_sample_ < b.bits_per_sample_) |
79 return true; | 81 return true; |
80 if (a.bits_per_sample_ > b.bits_per_sample_) | 82 if (a.bits_per_sample_ > b.bits_per_sample_) |
81 return false; | 83 return false; |
82 return a.frames_per_buffer_ < b.frames_per_buffer_; | 84 return a.frames_per_buffer_ < b.frames_per_buffer_; |
83 } | 85 } |
| 86 |
| 87 } // namespace media |
OLD | NEW |