Chromium Code Reviews| Index: media/audio/audio_parameters.cc |
| diff --git a/media/audio/audio_parameters.cc b/media/audio/audio_parameters.cc |
| index a78eb84a4cd1e615f18ec0a67660095c20e97491..14c32147a4df139de5e2d4b72095776b9adab783 100644 |
| --- a/media/audio/audio_parameters.cc |
| +++ b/media/audio/audio_parameters.cc |
| @@ -21,6 +21,11 @@ AudioParameters::AudioParameters(Format format, |
| frames_per_buffer); |
| } |
| +AudioParameters::~AudioParameters() {} |
|
aluebs-chromium
2015/09/10 02:41:39
Again, maybe I am missing something, but why do yo
ajm
2015/09/10 19:33:04
chromium-style violation, as in MediaStreamDevice.
aluebs-chromium
2015/09/11 01:58:42
Thanks for clarifying :)
|
| + |
| +AudioParameters::AudioParameters(const AudioParameters&) = default; |
| +AudioParameters& AudioParameters::operator=(const AudioParameters&) = default; |
|
ajm
2015/09/10 19:33:04
Likewise, had to move these to the implementation
|
| + |
| void AudioParameters::Reset(Format format, |
| ChannelLayout channel_layout, |
| int sample_rate, |
| @@ -33,6 +38,7 @@ void AudioParameters::Reset(Format format, |
| bits_per_sample_ = bits_per_sample; |
| frames_per_buffer_ = frames_per_buffer; |
| effects_ = NO_EFFECTS; |
| + mic_positions_.clear(); |
| } |
| bool AudioParameters::IsValid() const { |
| @@ -54,7 +60,8 @@ std::string AudioParameters::AsHumanReadableString() const { |
| << " channels: " << channels() << " sample_rate: " << sample_rate() |
| << " bits_per_sample: " << bits_per_sample() |
| << " frames_per_buffer: " << frames_per_buffer() |
| - << " effects: " << effects(); |
| + << " effects: " << effects() |
| + << " mic_positions: " << PointsToString(mic_positions_); |
| return s.str(); |
| } |
| @@ -77,13 +84,12 @@ base::TimeDelta AudioParameters::GetBufferDuration() const { |
| } |
| bool AudioParameters::Equals(const AudioParameters& other) const { |
| - return format_ == other.format() && |
| - sample_rate_ == other.sample_rate() && |
| + return format_ == other.format() && sample_rate_ == other.sample_rate() && |
| channel_layout_ == other.channel_layout() && |
| channels_ == other.channels() && |
| bits_per_sample_ == other.bits_per_sample() && |
| frames_per_buffer_ == other.frames_per_buffer() && |
| - effects_ == other.effects(); |
| + effects_ == other.effects() && mic_positions_ == other.mic_positions_; |
| } |
| } // namespace media |