Server Gateway SDK v3.7.200.21 for Linux Java
Public Member Functions | List of all members
io.agora.rtc.AgoraLocalAudioTrack Class Reference

Public Member Functions

 AgoraLocalAudioTrack (long cptr)
 
void destroy ()
 
native void setEnabled (int enable)
 
native int isEnabled ()
 
native int getState ()
 
native LocalAudioTrackStats getStats ()
 
native void destroyStats (LocalAudioTrackStats stats)
 
native int adjustPublishVolume (int volume)
 
native int getPublishVolume (Out volume)
 

Constructor & Destructor Documentation

◆ AgoraLocalAudioTrack()

io.agora.rtc.AgoraLocalAudioTrack.AgoraLocalAudioTrack ( long  cptr)

Constructor.

Member Function Documentation

◆ adjustPublishVolume()

native int io.agora.rtc.AgoraLocalAudioTrack.adjustPublishVolume ( int  volume)

Adjusts the audio volume for publishing.

Parameters
volumeThe volume for publishing. The value ranges between 0 and 100 (default).
Returns
  • 0: Success.
  • < 0: Failure.

◆ destroy()

void io.agora.rtc.AgoraLocalAudioTrack.destroy ( )

Destructor.

◆ destroyStats()

native void io.agora.rtc.AgoraLocalAudioTrack.destroyStats ( LocalAudioTrackStats  stats)

◆ getPublishVolume()

native int io.agora.rtc.AgoraLocalAudioTrack.getPublishVolume ( Out  volume)

Gets the current volume for publishing.

Parameters
volumeThe publishing volume.
Returns
  • 0: Success.
  • < 0: Failure.

◆ getState()

native int io.agora.rtc.AgoraLocalAudioTrack.getState ( )

Gets the state of the local audio.

Returns
The state of the local audio.

◆ getStats()

native LocalAudioTrackStats io.agora.rtc.AgoraLocalAudioTrack.getStats ( )

Gets the statistics of the local audio track.

Returns
The statistics of the local audio.

◆ isEnabled()

native int io.agora.rtc.AgoraLocalAudioTrack.isEnabled ( )

Gets whether the local audio track is enabled.

Returns
Whether the local audio track is enabled:
  • true: The local track is enabled.
  • false: The local track is disabled.

◆ setEnabled()

native void io.agora.rtc.AgoraLocalAudioTrack.setEnabled ( int  enable)

Enables or disables the local audio track.

Once the local audio is enabled, the SDK allows for local audio capturing, processing, and encoding.

Parameters
enableWhether to enable the audio track:
  • true: Enable the local audio track.
  • false: Disable the local audio track.

The documentation for this class was generated from the following file: