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

Unified Diff: media/audio/audio_parameters.h

Issue 15979015: Reland 15721002: Hook up the device selection to the WebAudio live audio (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed the comments. Created 7 years, 7 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.h
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h
index dcc9eae44705a7f5f9bf77cd2e600d7d24a2bbb3..02a6f9661ccb5b4ccce28740277a8fca1f11098b 100644
--- a/media/audio/audio_parameters.h
+++ b/media/audio/audio_parameters.h
@@ -79,6 +79,16 @@ class MEDIA_EXPORT AudioParameters {
// Set to CHANNEL_LAYOUT_DISCRETE with given number of channels.
void SetDiscreteChannels(int channels);
+ // Comparison with other AudioParams.
+ bool operator==(const AudioParameters& other) const {
+ return format_ == other.format() &&
+ channel_layout_ == other.channel_layout() &&
+ channels_ == other.channels() &&
+ input_channels_ == other.input_channels() &&
+ bits_per_sample_ == other.bits_per_sample() &&
+ frames_per_buffer_ == other.frames_per_buffer();
+ }
+
private:
Format format_; // Format of the stream.
ChannelLayout channel_layout_; // Order of surround sound channels.

Powered by Google App Engine
This is Rietveld 408576698