Skip to content

Most visited

Recently visited

navigation
Added in API level 16

AcousticEchoCanceler

public class AcousticEchoCanceler
extends AudioEffect

java.lang.Object
   ↳ android.media.audiofx.AudioEffect
     ↳ android.media.audiofx.AcousticEchoCanceler


Acoustic Echo Canceler (AEC).

Acoustic Echo Canceler (AEC) is an audio pre-processing which removes the contribution of the signal received from the remote party from the captured audio signal.

AEC is used by voice communication applications (voice chat, video conferencing, SIP calls) where the presence of echo with significant delay in the signal received from the remote party is highly disturbing. AEC is often used in conjunction with noise suppression (NS).

An application creates an AcousticEchoCanceler object to instantiate and control an AEC engine in the audio capture path.

To attach the AcousticEchoCanceler to a particular AudioRecord, specify the audio session ID of this AudioRecord when creating the AcousticEchoCanceler. The audio session is retrieved by calling getAudioSessionId() on the AudioRecord instance.

On some devices, an AEC can be inserted by default in the capture path by the platform according to the MediaRecorder.AudioSource used. The application should call AcousticEchoCanceler.getEnable() after creating the AEC to check the default AEC activation state on a particular AudioRecord session.

See AudioEffect class for more details on controlling audio effects.

Summary

Inherited constants

From class android.media.audiofx.AudioEffect

Inherited fields

From class android.media.audiofx.AudioEffect

Public methods

static AcousticEchoCanceler create(int audioSession)

Creates an AcousticEchoCanceler and attaches it to the AudioRecord on the audio session specified.

static boolean isAvailable()

Checks if the device implements acoustic echo cancellation.

Inherited methods

From class android.media.audiofx.AudioEffect
From class java.lang.Object

Public methods

create

Added in API level 16
AcousticEchoCanceler create (int audioSession)

Creates an AcousticEchoCanceler and attaches it to the AudioRecord on the audio session specified.

Parameters
audioSession int: system wide unique audio session identifier. The AcousticEchoCanceler will be applied to the AudioRecord with the same audio session.
Returns
AcousticEchoCanceler AcousticEchoCanceler created or null if the device does not implement AEC.

isAvailable

Added in API level 16
boolean isAvailable ()

Checks if the device implements acoustic echo cancellation.

Returns
boolean true if the device implements acoustic echo cancellation, false otherwise.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.