Class AudioData

java.lang.Object
com.opentok.android.AudioData

public class AudioData extends Object
Defines audio data passed into the PublisherKit.CustomAudioTransformer.transform() method.
  • Constructor Details

    • AudioData

      public AudioData(long sampleBufferPtr, int bitsPerSample, int sampleRate, int numberOfChannels, int numberOfSamples)
  • Method Details

    • getSampleBuffer

      public ByteBuffer getSampleBuffer()
      The buffer with the audio samples. The total size of the buffer is NumberOfSamples * NumberOfChannels * BitsPerSample / 8. Inside the buffer, the data is organized one sample after the other, where each sample contains all channels, one after the other. For a batch of stereo audio, the buffer looks like this: S1C1 S1C2 S2C1 S2C2 ...
    • getBitsPerSample

      public int getBitsPerSample()
      The number of bits in each sample.
    • getSampleRate

      public int getSampleRate()
      The bitrate of the samples, in bits per second.
    • getNumberOfChannels

      public int getNumberOfChannels()
      The number of audio channels.
    • getNumberOfSamples

      public int getNumberOfSamples()
      The number of samples.