Struct Format

Struct Documentation

struct Format

Interleaved PCM format supported by the neutral audio contract: mono/stereo at 8..192kHz.

Public Functions

void validate() const

Reject unsupported channel count or sample rate with invalid_args; no device or allocation is required.

bool operator==(const Format&) const = default

Compare channel count and sample rate by value.

Public Members

std::uint32_t channels = 2

Samples per frame; only 1(mono) or 2(stereo) are supported.

std::uint32_t sample_rate = 48000

Frames per second, inclusive 8000..192000.