Class RCCallPlusAudioFrame

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Array<byte> getBytes() 声音数据缓存区(如果是双声道,数据是交叉存储的)。 缓存区数据大小 bytes = samples x channels x bytesPerSample
      void setBytes(Array<byte> bytes) 设置音频 PCM 数据
      int getChannels() 声道数量(如果是双声道,数据是交叉的)。
      void setChannels(int channels) 设置声道数 [1, 2]
      int getSampleRate() 获取音频采样率。一般常用:16000、32000、44100、48000Hz。
      void setSampleRate(int sampleRate) 设置音频采样率 Hz
      int getBytesPerSample() 每个采样点的字节数: 对于 PCM 来说,一般使用 16 bit,即两个字节。
      void setBytesPerSample(int bytesPerSample)
      long getTimestamp() 当前音频帧的相对时间戳。
      void setTimestamp(long timestamp)
      int getSamples() 每个声道的采样点数。
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RCCallPlusAudioFrame

        RCCallPlusAudioFrame()
      • RCCallPlusAudioFrame

        RCCallPlusAudioFrame(Array<byte> bytes, int channels, int sampleRate, int bytesPerSample)
    • Method Detail

      • getBytes

         Array<byte> getBytes()

        声音数据缓存区(如果是双声道,数据是交叉存储的)。

        缓存区数据大小 bytes = samples x channels x bytesPerSample

      • setBytes

         void setBytes(Array<byte> bytes)

        设置音频 PCM 数据

      • getChannels

         int getChannels()

        声道数量(如果是双声道,数据是交叉的)。

        Returns:

        声道数。单声道: 1 双声道: 2

      • setChannels

         void setChannels(int channels)

        设置声道数 [1, 2]

      • getSampleRate

         int getSampleRate()

        获取音频采样率。一般常用:16000、32000、44100、48000Hz。

        Returns:

        音频采样率

      • setSampleRate

         void setSampleRate(int sampleRate)

        设置音频采样率 Hz

      • getBytesPerSample

         int getBytesPerSample()

        每个采样点的字节数: 对于 PCM 来说,一般使用 16 bit,即两个字节。

        Returns:

        每个采样点的字节数

      • getTimestamp

         long getTimestamp()

        当前音频帧的相对时间戳。

        Returns:

        时间戳

      • getSamples

         int getSamples()

        每个声道的采样点数。

        Returns:

        采样点数