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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "media/base/limits.h" | 8 #include "media/base/limits.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 bool AudioParameters::Equals(const AudioParameters& other) const { | 90 bool AudioParameters::Equals(const AudioParameters& other) const { |
91 return format_ == other.format() && sample_rate_ == other.sample_rate() && | 91 return format_ == other.format() && sample_rate_ == other.sample_rate() && |
92 channel_layout_ == other.channel_layout() && | 92 channel_layout_ == other.channel_layout() && |
93 channels_ == other.channels() && | 93 channels_ == other.channels() && |
94 bits_per_sample_ == other.bits_per_sample() && | 94 bits_per_sample_ == other.bits_per_sample() && |
95 frames_per_buffer_ == other.frames_per_buffer() && | 95 frames_per_buffer_ == other.frames_per_buffer() && |
96 effects_ == other.effects() && mic_positions_ == other.mic_positions_; | 96 effects_ == other.effects() && mic_positions_ == other.mic_positions_; |
97 } | 97 } |
98 | 98 |
| 99 // static |
| 100 AudioParameters AudioParameters::UnavailableDeviceParams() { |
| 101 return media::AudioParameters( |
| 102 media::AudioParameters::AUDIO_FAKE, media::CHANNEL_LAYOUT_STEREO, |
| 103 media::AudioParameters::kAudioCDSampleRate, 16, |
| 104 media::AudioParameters::kAudioCDSampleRate / 10); |
| 105 } |
| 106 |
99 } // namespace media | 107 } // namespace media |
OLD | NEW |