Class NCCallAudioFrame

java.lang.Object
ai.nexconn.call.api.NCCallAudioFrame

public class NCCallAudioFrame extends Object
Audio frame data.
  • Constructor Details

    • NCCallAudioFrame

      public NCCallAudioFrame()
    • NCCallAudioFrame

      public NCCallAudioFrame(byte[] bytes, int channels, int sampleRate, int bytesPerSample)
  • Method Details

    • getBytes

      public byte[] getBytes()
      Audio data buffer. For stereo audio, the data is interleaved. Buffer size in bytes = samples x channels x bytesPerSample.
    • getChannels

      public int getChannels()
      Returns the number of channels. Mono: 1. Stereo: 2.
    • getSampleRate

      public int getSampleRate()
      Returns the audio sample rate. Common values are 16000, 32000, 44100, and 48000 Hz.
    • getBytesPerSample

      public int getBytesPerSample()
      Returns the number of bytes per sample. PCM usually uses 16 bits, which is 2 bytes.
    • setBytesPerSample

      public void setBytesPerSample(int bytesPerSample)
    • getSamples

      public int getSamples()
      Returns the number of samples per channel.
    • setBytes

      public void setBytes(byte[] bytes)
    • setChannels

      public void setChannels(int channels)
    • setSampleRate

      public void setSampleRate(int sampleRate)
    • getTimestamp

      public long getTimestamp()
      Returns the relative timestamp of the current audio frame.
    • setTimestamp

      public void setTimestamp(long timestamp)