Package com.telnyx.webrtc.lib.audio
Class JavaAudioDeviceModule
java.lang.Object
com.telnyx.webrtc.lib.audio.JavaAudioDeviceModule
- All Implemented Interfaces:
AudioDeviceModule
AudioDeviceModule implemented using android.media.AudioRecord as input and
android.media.AudioTrack as output.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic enumstatic interfaceCalled when audio recording starts and stops.static classContains audio sample information.static interfacestatic enumstatic interfaceCalled when audio playout starts and stops.static classstatic interfaceCalled when new audio samples are ready. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns a C++ pointer to a webrtc::AudioDeviceModule.static booleanReturns true if the device supports built-in HW AEC, and the UUID is approved (some UUIDs can be excluded).static booleanReturns true if the device supports built-in HW NS, and the UUID is approved (some UUIDs can be excluded).voidrelease()Release resources for this AudioDeviceModule, including native resources.voidsetMicrophoneMute(boolean mute) Control muting/unmuting the microphone.booleansetNoiseSuppressorEnabled(boolean enabled) Enable or disable built in noise suppressor.voidsetPreferredInputDevice(AudioDeviceInfo preferredInputDevice) Start to prefer a specificAudioDeviceInfodevice for recording.voidsetSpeakerMute(boolean mute) Control muting/unmuting the speaker.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.telnyx.webrtc.lib.audio.AudioDeviceModule
setPreferredMicrophoneFieldDimension
-
Method Details
-
builder
-
isBuiltInAcousticEchoCancelerSupported
public static boolean isBuiltInAcousticEchoCancelerSupported()Returns true if the device supports built-in HW AEC, and the UUID is approved (some UUIDs can be excluded). -
isBuiltInNoiseSuppressorSupported
public static boolean isBuiltInNoiseSuppressorSupported()Returns true if the device supports built-in HW NS, and the UUID is approved (some UUIDs can be excluded). -
getNativeAudioDeviceModulePointer
public long getNativeAudioDeviceModulePointer()Description copied from interface:AudioDeviceModuleReturns a C++ pointer to a webrtc::AudioDeviceModule. Caller does _not_ take ownership and lifetime is handled through the release() call.- Specified by:
getNativeAudioDeviceModulePointerin interfaceAudioDeviceModule
-
release
public void release()Description copied from interface:AudioDeviceModuleRelease resources for this AudioDeviceModule, including native resources. The object should not be used after this call.- Specified by:
releasein interfaceAudioDeviceModule
-
setSpeakerMute
public void setSpeakerMute(boolean mute) Description copied from interface:AudioDeviceModuleControl muting/unmuting the speaker.- Specified by:
setSpeakerMutein interfaceAudioDeviceModule
-
setMicrophoneMute
public void setMicrophoneMute(boolean mute) Description copied from interface:AudioDeviceModuleControl muting/unmuting the microphone.- Specified by:
setMicrophoneMutein interfaceAudioDeviceModule
-
setNoiseSuppressorEnabled
public boolean setNoiseSuppressorEnabled(boolean enabled) Description copied from interface:AudioDeviceModuleEnable or disable built in noise suppressor. Returns true if the enabling was successful, otherwise false is returned.- Specified by:
setNoiseSuppressorEnabledin interfaceAudioDeviceModule
-
setPreferredInputDevice
Start to prefer a specificAudioDeviceInfodevice 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.
-