public class LocalAudioTrack extends AudioTrack
audioSinks
Modifier and Type | Method and Description |
---|---|
void |
addSink(AudioSink audioSink)
Adds a sink to the Track.
|
static LocalAudioTrack |
create(android.content.Context context,
boolean enabled)
Creates an audio track.
|
static LocalAudioTrack |
create(android.content.Context context,
boolean enabled,
AudioOptions audioOptions)
Creates an audio track.
|
static LocalAudioTrack |
create(android.content.Context context,
boolean enabled,
AudioOptions audioOptions,
String name)
Creates an audio track.
|
static LocalAudioTrack |
create(android.content.Context context,
boolean enabled,
String name)
Creates an audio track.
|
void |
enable(boolean enable)
Sets the state of the local audio track.
|
String |
getName()
Returns the local audio track name.
|
boolean |
isEnabled()
Check if the local audio track is enabled.
|
void |
release()
Releases native memory owned by audio track.
|
void |
removeSink(AudioSink audioSink)
Removes a sink from the Track.
|
public static LocalAudioTrack create(android.content.Context context, boolean enabled)
context
- application context.enabled
- initial state of audio track.public static LocalAudioTrack create(android.content.Context context, boolean enabled, AudioOptions audioOptions)
context
- application context.enabled
- initial state of audio track.audioOptions
- audio options to be applied to the track.public static LocalAudioTrack create(android.content.Context context, boolean enabled, String name)
context
- application context.enabled
- initial state of audio track.name
- audio track name.public static LocalAudioTrack create(android.content.Context context, boolean enabled, AudioOptions audioOptions, String name)
context
- application context.enabled
- initial state of audio track.audioOptions
- audio options to be applied to track.name
- audio track name.public boolean isEnabled()
When the value is false, the local audio track is muted. When the value is true the local audio track is live.
isEnabled
in interface Track
isEnabled
in class AudioTrack
public String getName()
getName
in interface Track
getName
in class AudioTrack
public void enable(boolean enable)
enable
- the desired state of the local audio track.public void release()
public void addSink(AudioSink audioSink)
addSink
in class AudioTrack
public void removeSink(AudioSink audioSink)
removeSink
in class AudioTrack
audioSink
- An object that implements the `AudioSink` interface.5.13.0