Class AudioParams

java.lang.Object
io.agora.rtc2.audio.AudioParams

public class AudioParams extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    The number of audio channels, which can be set as either of the following values: - 1: (Default) Mono.
    int
    The use mode of the audio data, which can be set as either of the following values: - RAW_AUDIO_FRAME_OP_MODE_READ_ONLY (0): Read-only mode, For example, when users acquire the data with the Agora SDK, then start the media push.
    int
    The audio sample rate (Hz), which can be set as one of the following values: - 8000.
    int
    The number of samples, such as 1024 for the media push.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AudioParams(int sampleRate, int channelCnt, int mode, int samplesPerCall)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
     
    int
     
    int
     
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • sampleRate

      public int sampleRate
      The audio sample rate (Hz), which can be set as one of the following values: - 8000. - (Default) 16000. - 32000. - 44100 - 48000
    • channel

      public int channel
      The number of audio channels, which can be set as either of the following values: - 1: (Default) Mono. - 2: Stereo.
    • mode

      public int mode
      The use mode of the audio data, which can be set as either of the following values: - RAW_AUDIO_FRAME_OP_MODE_READ_ONLY (0): Read-only mode, For example, when users acquire the data with the Agora SDK, then start the media push. - RAW_AUDIO_FRAME_OP_MODE_READ_WRITE (2): Read and write mode, For example, when users have their own audio-effect processing module and perform some voice pre-processing, such as a voice change.
    • samplesPerCall

      public int samplesPerCall
      The number of samples, such as 1024 for the media push.
  • Constructor Details

    • AudioParams

      public AudioParams(int sampleRate, int channelCnt, int mode, int samplesPerCall)
  • Method Details

    • getSampleRate

      public int getSampleRate()
    • getChannel

      public int getChannel()
    • getMode

      public int getMode()
    • getSamplesPerCall

      public int getSamplesPerCall()
    • toString

      public String toString()
      Overrides:
      toString in class Object