public class JavaAudioDeviceModule extends java.lang.Object implements AudioDeviceModule
Modifier and Type | Class and Description |
---|---|
static interface |
JavaAudioDeviceModule.AudioRecordErrorCallback |
static class |
JavaAudioDeviceModule.AudioRecordStartErrorCode |
static interface |
JavaAudioDeviceModule.AudioRecordStateCallback
Called when audio recording starts and stops.
|
static class |
JavaAudioDeviceModule.AudioSamples
Contains audio sample information.
|
static interface |
JavaAudioDeviceModule.AudioTrackErrorCallback |
static class |
JavaAudioDeviceModule.AudioTrackStartErrorCode |
static interface |
JavaAudioDeviceModule.AudioTrackStateCallback
Called when audio playout starts and stops.
|
static class |
JavaAudioDeviceModule.Builder |
static interface |
JavaAudioDeviceModule.SamplesReadyCallback
Called when new audio samples are ready.
|
Modifier and Type | Method and Description |
---|---|
static JavaAudioDeviceModule.Builder |
builder(android.content.Context context) |
long |
getNativeAudioDeviceModulePointer()
Returns a C++ pointer to a webrtc::AudioDeviceModule.
|
static boolean |
isBuiltInAcousticEchoCancelerSupported()
Returns true if the device supports built-in HW AEC, and the UUID is approved (some UUIDs can
be excluded).
|
static boolean |
isBuiltInNoiseSuppressorSupported()
Returns true if the device supports built-in HW NS, and the UUID is approved (some UUIDs can be
excluded).
|
void |
release()
Release resources for this AudioDeviceModule, including native resources.
|
void |
setMicrophoneMute(boolean mute)
Control muting/unmuting the microphone.
|
void |
setPreferredInputDevice(android.media.AudioDeviceInfo preferredInputDevice)
Start to prefer a specific
AudioDeviceInfo device for recording. |
void |
setSpeakerMute(boolean mute)
Control muting/unmuting the speaker.
|
public static JavaAudioDeviceModule.Builder builder(android.content.Context context)
public static boolean isBuiltInAcousticEchoCancelerSupported()
public static boolean isBuiltInNoiseSuppressorSupported()
public long getNativeAudioDeviceModulePointer()
AudioDeviceModule
getNativeAudioDeviceModulePointer
in interface AudioDeviceModule
public void release()
AudioDeviceModule
release
in interface AudioDeviceModule
public void setSpeakerMute(boolean mute)
AudioDeviceModule
setSpeakerMute
in interface AudioDeviceModule
public void setMicrophoneMute(boolean mute)
AudioDeviceModule
setMicrophoneMute
in interface AudioDeviceModule
public void setPreferredInputDevice(android.media.AudioDeviceInfo preferredInputDevice)
AudioDeviceInfo
device for recording. Typically this should
only be used if a client gives an explicit option for choosing a physical device to record
from. Otherwise the best-matching device for other parameters will be used. Calling after
recording is started may cause a temporary interruption if the audio routing changes.7.0.1