AudioPcmFrame

Used to describe parameters of PCM format audio frames.

struct AudioPcmFrame {
  OPTIONAL_ENUM_SIZE_T{
    kMaxDataSizeSamples = 3840,
    kMaxDataSizeBytes = kMaxDataSizeSamples * sizeof(int16_t),
  };
  int64_t capture_timestamp;
  size_t samples_per_channel_;
  int sample_rate_hz_;
  size_t num_channels_;
  int audio_track_number_;
  rtc::BYTES_PER_SAMPLE bytes_per_sample;
  int16_t data_[kMaxDataSizeSamples];
  bool is_stereo_;
};

Properties

capture_timestamp
Timestamp of the audio frame (unit: milliseconds).
samples_per_channel_
Number of samples per channel.
sample_rate_hz_
Audio sample rate (unit: Hz).
num_channels_
Number of audio channels.
bytes_per_sample
Number of bytes per sample.
data_
Raw data of the audio frame.