Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: media/audio/audio_parameters.cc

Issue 12387006: Pass more detailed audio hardware configuration information to the renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/audio/audio_parameters.cc
===================================================================
--- media/audio/audio_parameters.cc (revision 186233)
+++ media/audio/audio_parameters.cc (working copy)
@@ -61,7 +61,7 @@
(format_ < AUDIO_LAST_FORMAT) &&
(channels_ > 0) &&
(channels_ <= media::limits::kMaxChannels) &&
- (channel_layout_ > CHANNEL_LAYOUT_UNSUPPORTED) &&
+ (channel_layout_ >= CHANNEL_LAYOUT_UNSUPPORTED) &&
(channel_layout_ < CHANNEL_LAYOUT_MAX) &&
(input_channels_ >= 0) &&
(input_channels_ <= media::limits::kMaxChannels) &&
@@ -85,4 +85,9 @@
return channels_ * bits_per_sample_ / 8;
}
+void AudioParameters::SetDiscreteChannels(int channels) {
+ channel_layout_ = CHANNEL_LAYOUT_UNSUPPORTED;
+ channels_ = channels;
+}
+
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698