public class AgoraLocalAudioTrack
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private long |
cptr
Native pointer to the local audio track resource.
|
| Constructor and Description |
|---|
AgoraLocalAudioTrack(long cptr)
Constructor for AgoraLocalAudioTrack.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) int |
adjustPublishVolume(int volume)
Adjusts the publish volume of the local audio track.
|
(package private) int |
clearSenderBuffer()
Clears the sender buffer.
|
(package private) void |
destroy()
Destroys the local audio track.
|
(package private) void |
destroyStats(LocalAudioTrackStats stats)
Destroys the provided LocalAudioTrackStats object.
|
(package private) int |
enableEarMonitor(int enable,
int includeAudiFilter)
Enables or disables ear monitoring.
|
(package private) int |
enableLocalPlayback(int enable)
Enables or disables local playback of the audio track.
|
(package private) long |
getNativeHandle()
Gets the native handle of the local audio track.
|
(package private) int |
getPublishVolume(Out<java.lang.Integer> volume)
Gets the current publish volume of the local audio track.
|
(package private) int |
getState()
Gets the current state of the local audio track.
|
(package private) LocalAudioTrackStats |
getStats()
Retrieves the statistics of the local audio track.
|
(package private) int |
isEnabled()
Checks if the local audio track is enabled.
|
private int |
nativeAdjustPublishVolume(long cptr,
int volume)
Adjusts publish volume in the native layer.
|
private int |
nativeClearSenderBuffer(long cptr)
Clears buffered audio frames in the native sender.
|
private void |
nativeDestroy(long cptr)
Releases the native audio track handle.
|
private void |
nativeDestroyStats(long cptr,
LocalAudioTrackStats stats)
Releases a statistics object that was created natively.
|
private int |
nativeEnableEarMonitor(long cptr,
int enable,
int includeAudiFilter)
Enables or disables ear monitoring through the native API.
|
private int |
nativeEnableLocalPlayback(long cptr,
int enable)
Enables or disables local playback of the audio track natively.
|
private int |
nativeGetPublishVolume(long cptr,
Out<java.lang.Integer> volume)
Retrieves the publish volume from the native layer.
|
private int |
nativeGetState(long cptr)
Retrieves the native state value of the audio track.
|
private LocalAudioTrackStats |
nativeGetStats(long cptr)
Obtains statistics for the audio track from the native layer.
|
private int |
nativeIsEnabled(long cptr)
Queries whether the audio track is enabled in the native layer.
|
private void |
nativeSetEnabled(long cptr,
int enable)
Enables or disables the audio track at the native layer.
|
private void |
nativeSetMaxBufferedAudioFrameNumber(long cptr,
int number)
Sets the maximum buffered frame count for the native audio sender.
|
private void |
nativeSetSendDelayMs(long cptr,
int delayMs)
Adjusts the native send delay in milliseconds.
|
private int |
nativeSetTotalExtraSendMs(long cptr,
long totalExtraSendMs)
Sets the total extra send time in milliseconds at the native layer.
|
(package private) void |
setEnabled(int enable)
Enables or disables the local audio track.
|
(package private) void |
setMaxBufferedAudioFrameNumber(int number)
Sets the maximum number of buffered audio frames.
|
(package private) void |
setSendDelayMs(int delayMs)
Sets the send delay in milliseconds.
|
(package private) int |
setTotalExtraSendMs(long totalExtraSendMs)
Sets the total extra send time in milliseconds.
|
AgoraLocalAudioTrack(long cptr)
cptr - Pointer to the native audio track object.long getNativeHandle()
void destroy()
void setEnabled(int enable)
enable - 1 to enable, 0 to disable.int isEnabled()
int getState()
LocalAudioTrackStats getStats()
void destroyStats(LocalAudioTrackStats stats)
stats - The LocalAudioTrackStats object to be destroyed.int adjustPublishVolume(int volume)
volume - The volume level to set.int getPublishVolume(Out<java.lang.Integer> volume)
volume - An Out object to store the volume level.int enableLocalPlayback(int enable)
enable - 1 to enable, 0 to disable.int enableEarMonitor(int enable,
int includeAudiFilter)
enable - 1 to enable, 0 to disable.includeAudiFilter - 1 to include audio filter, 0 to exclude.void setMaxBufferedAudioFrameNumber(int number)
number - The maximum number of frames to buffer.int clearSenderBuffer()
void setSendDelayMs(int delayMs)
delayMs - The delay in milliseconds.int setTotalExtraSendMs(long totalExtraSendMs)
This method is used for AI server limited mode to set the total duration for fast transmission of audio frames.
totalExtraSendMs - The total extra send time in milliseconds.private void nativeDestroy(long cptr)
cptr - Native pointer to the audio trackprivate void nativeSetEnabled(long cptr,
int enable)
cptr - Native pointer to the audio trackenable - 1 to enable, 0 to disableprivate int nativeIsEnabled(long cptr)
cptr - Native pointer to the audio trackprivate int nativeGetState(long cptr)
cptr - Native pointer to the audio trackprivate LocalAudioTrackStats nativeGetStats(long cptr)
cptr - Native pointer to the audio trackprivate void nativeDestroyStats(long cptr,
LocalAudioTrackStats stats)
cptr - Native pointer to the audio trackstats - Statistics object to destroyprivate int nativeAdjustPublishVolume(long cptr,
int volume)
cptr - Native pointer to the audio trackvolume - Volume level to setprivate int nativeGetPublishVolume(long cptr,
Out<java.lang.Integer> volume)
cptr - Native pointer to the audio trackvolume - Output parameter for volume levelprivate int nativeEnableLocalPlayback(long cptr,
int enable)
cptr - Native pointer to the audio trackenable - 1 to enable, 0 to disableprivate int nativeEnableEarMonitor(long cptr,
int enable,
int includeAudiFilter)
cptr - Native pointer to the audio trackenable - 1 to enable, 0 to disableincludeAudiFilter - 1 to include audio filter, 0 to excludeprivate void nativeSetMaxBufferedAudioFrameNumber(long cptr,
int number)
cptr - Native pointer to the audio tracknumber - Maximum number of frames to bufferprivate int nativeClearSenderBuffer(long cptr)
cptr - Native pointer to the audio trackprivate void nativeSetSendDelayMs(long cptr,
int delayMs)
cptr - Native pointer to the audio trackdelayMs - Delay in millisecondsprivate int nativeSetTotalExtraSendMs(long cptr,
long totalExtraSendMs)
cptr - Native pointer to the audio tracktotalExtraSendMs - Total extra send time in milliseconds