Class AudioFrame

Raw audio data.

Hierarchy

  • AudioFrame

Constructors

Properties

avsync_type?: number

Reserved for future use.

buffer?: Uint8Array

The data buffer of the audio frame. When the audio frame uses a stereo channel, the data buffer is interleaved. The size of the data buffer is as follows: buffer = samples × channels × bytesPerSample.

bytesPerSample?: TwoBytesPerSample

The number of bytes per sample. For PCM, this parameter is generally set to 16 bits (2 bytes).

channels?: number

The number of audio channels (the data are interleaved if it is stereo). 1: Mono. 2: Stereo.

renderTimeMs?: number

The timestamp (ms) of the external audio frame. You can use this timestamp to restore the order of the captured audio frame, and synchronize audio and video frames in video scenarios, including scenarios where external video sources are used.

samplesPerChannel?: number

The number of samples per channel in the audio frame.

samplesPerSec?: number

The number of samples per channel in the audio frame.

The type of the audio frame. See AudioFrameType.

Generated using TypeDoc