blob: 1237a849a287db5df37f13863570d8a03fdf9323 [file] [log] [blame]
// Copyright 2022 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.audio.mixer;
const MAX_GAIN_STAGES_PER_EDGE uint32 = 32;
/// Ways that a Mixer node can sample from its source stream to produce a
/// destination stream.
type Sampler = flexible union {
1: point_sampler PointSampler;
2: sinc_sampler SincSampler;
};
/// Use the "sample-and-hold" paradigm. This sampler can be used only if the
/// source has the same sample rate as the Mixer's output stream.
type PointSampler = table {};
/// Use a windowed sinc sampler.
type SincSampler = table {
/// Number of taps to include on each side of the filter, not counting the
/// center point. When upsampling, the filter reads from 1 + 2*taps_per_side
/// source frames to produce each destination frame. When downsampling, this
/// number is scaled by the downsampling ratio.
///
/// Required.
1: taps_per_side uint32;
/// Optionally, apply a low-pass filter.
2: low_pass_frequency uint32;
/// Optionally, apply a high-pass filter.
3: high_pass_frequency uint32;
};