AudioFrame

Raw audio data.

class AudioFrame {
  const AudioFrame(
      {this.type,
      this.samplesPerChannel,
      this.bytesPerSample,
      this.channels,
      this.samplesPerSec,
      this.buffer,
      this.renderTimeMs,
      this.avsyncType});

Properties

type
Audio frame type. See AudioFrameType.
samplesPerChannel
Number of samples per channel.
bytesPerSample
Number of bytes per sample. For PCM, typically 16 bits, i.e., two bytes.
channels
Number of channels (data is interleaved if stereo).
  • 1: Mono
  • 2: Stereo
samplesPerSec
Number of samples per second per channel.
buffer
Audio data buffer (data is interleaved if stereo). Buffer size buffer = samples × channels × bytesPerSample.
renderTimeMs
Render timestamp of the external audio frame. You can use this timestamp to restore the audio frame order; in scenarios with video (including external video source), this parameter can be used to achieve audio-video synchronization.
avsyncType
Reserved parameter.