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

Side by Side Diff: media/audio/audio_parameters.h

Issue 285233005: add audio-buffer-size command line flag support to the input audio for all the platforms (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « media/audio/audio_manager_base.cc ('k') | media/audio/cras/audio_manager_cras.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_PARAMETERS_H_
6 #define MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 6 #define MEDIA_AUDIO_AUDIO_PARAMETERS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "media/base/channel_layout.h" 10 #include "media/base/channel_layout.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 bool operator==(const AudioParameters& other) const { 101 bool operator==(const AudioParameters& other) const {
102 return format_ == other.format() && 102 return format_ == other.format() &&
103 sample_rate_ == other.sample_rate() && 103 sample_rate_ == other.sample_rate() &&
104 channel_layout_ == other.channel_layout() && 104 channel_layout_ == other.channel_layout() &&
105 channels_ == other.channels() && 105 channels_ == other.channels() &&
106 input_channels_ == other.input_channels() && 106 input_channels_ == other.input_channels() &&
107 bits_per_sample_ == other.bits_per_sample() && 107 bits_per_sample_ == other.bits_per_sample() &&
108 frames_per_buffer_ == other.frames_per_buffer() && 108 frames_per_buffer_ == other.frames_per_buffer() &&
109 effects_ == other.effects(); 109 effects_ == other.effects();
110 } 110 }
111 bool operator!=(const AudioParameters& other) const {
112 return format_ != other.format() ||
113 sample_rate_ != other.sample_rate() ||
114 channel_layout_ != other.channel_layout() ||
115 channels_ != other.channels() ||
116 input_channels_ != other.input_channels() ||
117 bits_per_sample_ != other.bits_per_sample() ||
118 frames_per_buffer_ != other.frames_per_buffer() ||
119 effects_ != other.effects();
120 }
111 121
112 private: 122 private:
113 // These members are mutable to support entire struct assignment. They should 123 // These members are mutable to support entire struct assignment. They should
114 // not be mutated individually. 124 // not be mutated individually.
115 Format format_; // Format of the stream. 125 Format format_; // Format of the stream.
116 ChannelLayout channel_layout_; // Order of surround sound channels. 126 ChannelLayout channel_layout_; // Order of surround sound channels.
117 int sample_rate_; // Sampling frequency/rate. 127 int sample_rate_; // Sampling frequency/rate.
118 int bits_per_sample_; // Number of bits per sample. 128 int bits_per_sample_; // Number of bits per sample.
119 int frames_per_buffer_; // Number of frames in a buffer. 129 int frames_per_buffer_; // Number of frames in a buffer.
120 130
(...skipping 16 matching lines...) Expand all
137 if (a.sample_rate() != b.sample_rate()) 147 if (a.sample_rate() != b.sample_rate())
138 return a.sample_rate() < b.sample_rate(); 148 return a.sample_rate() < b.sample_rate();
139 if (a.bits_per_sample() != b.bits_per_sample()) 149 if (a.bits_per_sample() != b.bits_per_sample())
140 return a.bits_per_sample() < b.bits_per_sample(); 150 return a.bits_per_sample() < b.bits_per_sample();
141 return a.frames_per_buffer() < b.frames_per_buffer(); 151 return a.frames_per_buffer() < b.frames_per_buffer();
142 } 152 }
143 153
144 } // namespace media 154 } // namespace media
145 155
146 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 156 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_
OLDNEW
« no previous file with comments | « media/audio/audio_manager_base.cc ('k') | media/audio/cras/audio_manager_cras.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698