summaryrefslogtreecommitdiffstats
path: root/media/audio/audio_parameters.h
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 11:41:57 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 11:41:57 +0000
commit7ec092e25d8a596a6cf5f0366bd5aff13121902d (patch)
tree92ab3c3d77d0a8579286ad975b7f7fab29a37cfb /media/audio/audio_parameters.h
parent9c3198bf27b568cb5ce22567236fb3de0ca0912e (diff)
downloadchromium_src-7ec092e25d8a596a6cf5f0366bd5aff13121902d.zip
chromium_src-7ec092e25d8a596a6cf5f0366bd5aff13121902d.tar.gz
chromium_src-7ec092e25d8a596a6cf5f0366bd5aff13121902d.tar.bz2
Revert 240548 "Enable platform echo cancellation through the Aud..."
Causing compile failure on Chromium OS bots: chromeos-chrome-33.0.1738.0_alpha-r1: media/audio/cras/audio_manager_cras.cc:126:10: error: no matching constructor chromeos-chrome-33.0.1738.0_alpha-r1: for initialization of 'media::AudioParameters' chromeos-chrome-33.0.1738.0_alpha-r1: return AudioParameters( Logs: http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28x86%29/builds/18585 http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28amd64%29/builds/12929 http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28daisy%29/builds/14979 http://build.chromium.org/p/chromium.memory/builders/Chromium%20OS%20%28amd64%29%20ASAN/builds/8140 http://build.chromium.org/p/chromium.memory/builders/Chromium%20OS%20%28x86%29%20ASAN/builds/7509 > Enable platform echo cancellation through the AudioRecord path. > > Add a platform effects mask member to AudioParameters. This allows the > availability of platform effects (currently AEC) to be plumbed up to > MediaStreamDependencyFactory, where they can be reconciled with the > media constraints to determine if the effects should be enabled. When > this is the case, the constraints will be modified to disable the > corresponding software effect in PeerConnection. > > The availability is controlled by a whitelist of device models in > AudioManagerAndroid, which for AEC, currently consists of Nexus 5 and > Nexus 7. > > AudioManagerAndroid will use the AudioRecord path iff the platform > AEC is enabled. > > TESTED=Using apprtc on a N5 and N7 (whitelisted): > - The AudioRecord input path is used. > - The platform AEC is enabled and the software AEC (in PeerConnection) > is disabled. > - Calls have good echo cancellation quality. > > Using apprtc with ?audio=googEchoCancellation=false on a N5 and N7: > - The OpenSLES input path is used. > - Both the platform and software AEC are disabled. > > Using apprtc on Nexus 4 (non-whitelisted): > - The OpenSLES input path is used. > - The platform AEC is disabled and the software AEC is enabled. > > Using apprtc on Galaxy S2 (running ICS): > - The OpenSLES input path is used. > > audio_android_unittest.cc passes on N5, N7 and Galaxy S2 > > TBR=jschuh > > Review URL: https://codereview.chromium.org/99033003 TBR=ajm@chromium.org Review URL: https://codereview.chromium.org/110303003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240592 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/audio_parameters.h')
-rw-r--r--media/audio/audio_parameters.h24
1 files changed, 5 insertions, 19 deletions
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h
index 62ff4fd..9b86d31 100644
--- a/media/audio/audio_parameters.h
+++ b/media/audio/audio_parameters.h
@@ -44,13 +44,6 @@ class MEDIA_EXPORT AudioParameters {
kAudioCDSampleRate = 44100,
};
- // Bitmasks to determine whether certain platform (typically hardware) audio
- // effects should be enabled.
- enum PlatformEffectsMask {
- NO_EFFECTS = 0x0,
- ECHO_CANCELLER = 0x1
- };
-
AudioParameters();
AudioParameters(Format format, ChannelLayout channel_layout,
int sample_rate, int bits_per_sample,
@@ -58,12 +51,7 @@ class MEDIA_EXPORT AudioParameters {
AudioParameters(Format format, ChannelLayout channel_layout,
int input_channels,
int sample_rate, int bits_per_sample,
- int frames_per_buffer, int effects);
- AudioParameters(Format format, ChannelLayout channel_layout,
- int channels, int input_channels,
- int sample_rate, int bits_per_sample,
- int frames_per_buffer, int effects);
-
+ int frames_per_buffer);
void Reset(Format format, ChannelLayout channel_layout,
int channels, int input_channels,
int sample_rate, int bits_per_sample,
@@ -93,7 +81,9 @@ class MEDIA_EXPORT AudioParameters {
int frames_per_buffer() const { return frames_per_buffer_; }
int channels() const { return channels_; }
int input_channels() const { return input_channels_; }
- int effects() const { return effects_; }
+
+ // Set to CHANNEL_LAYOUT_DISCRETE with given number of channels.
+ void SetDiscreteChannels(int channels);
// Comparison with other AudioParams.
bool operator==(const AudioParameters& other) const {
@@ -103,13 +93,10 @@ class MEDIA_EXPORT AudioParameters {
channels_ == other.channels() &&
input_channels_ == other.input_channels() &&
bits_per_sample_ == other.bits_per_sample() &&
- frames_per_buffer_ == other.frames_per_buffer() &&
- effects_ == other.effects();
+ frames_per_buffer_ == other.frames_per_buffer();
}
private:
- // These members are mutable to support entire struct assignment. They should
- // not be mutated individually.
Format format_; // Format of the stream.
ChannelLayout channel_layout_; // Order of surround sound channels.
int sample_rate_; // Sampling frequency/rate.
@@ -121,7 +108,6 @@ class MEDIA_EXPORT AudioParameters {
int input_channels_; // Optional number of input channels.
// Normally 0, but can be set to specify
// synchronized I/O.
- int effects_; // Bitmask using PlatformEffectsMask.
};
// Comparison is useful when AudioParameters is used with std structures.