Chromium Code Reviews| Index: media/audio/audio_parameters.cc |
| =================================================================== |
| --- media/audio/audio_parameters.cc (revision 187053) |
| +++ media/audio/audio_parameters.cc (working copy) |
| @@ -44,16 +44,16 @@ |
| } |
| void AudioParameters::Reset(Format format, ChannelLayout channel_layout, |
| - int input_channels, |
| + int channels, int input_channels, |
| int sample_rate, int bits_per_sample, |
| int frames_per_buffer) { |
| format_ = format; |
| channel_layout_ = channel_layout; |
| + channels_ = channels; |
| input_channels_ = input_channels; |
| sample_rate_ = sample_rate; |
| bits_per_sample_ = bits_per_sample; |
| frames_per_buffer_ = frames_per_buffer; |
| - channels_ = ChannelLayoutToChannelCount(channel_layout); |
|
DaleCurtis
2013/03/11 19:21:50
Keep this as:
if (channel_layout_ != CHANNEL_LAYO
Chris Rogers
2013/03/12 22:32:31
Done.
|
| } |
| bool AudioParameters::IsValid() const { |
| @@ -85,4 +85,9 @@ |
| return channels_ * bits_per_sample_ / 8; |
| } |
| +void AudioParameters::SetDiscreteChannels(int channels) { |
| + channel_layout_ = CHANNEL_LAYOUT_DISCRETE; |
| + channels_ = channels; |
| +} |
| + |
| } // namespace media |