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