blob: 784abb1e81514f13255e72f91c151954bc2823c8 [file] [log] [blame] [edit]
// Copyright 2023 The Fuchsia Authors.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.audio.controller;
/// Gain settings.
type GainSettings = table {
/// Whether to mute the audio stream. If unspecified, do not adjust the existing mute value.
///
/// Optional.
1: mute bool;
/// Gain level in dB. If unspecified, do not adjust stream or device gain.
///
/// Optional.
2: gain float32;
};
/// Reference clock options for an `AudioRenderer` or `AudioCapturer`.
type ClockType = flexible union {
/// Use a flexible clock.
1: flexible struct {};
/// Use the system monotonic clock.
2: monotonic struct {};
/// Use a monotonic clock with possible rate adjustment and offset relative to the system
/// monotonic clock.
3: custom CustomClockConfig;
};
/// Configuration for the custom reference clock passed to an `AudioRenderer` or `AudioCapturer`.
type CustomClockConfig = table {
/// Frequency rate adjustment to a clone of the system monotonic clock.
/// Given in parts per million relative to the system monotonic rate.
/// Must fall within [ZX_CLOCK_UPDATE_MIN_RATE_ADJUST, ZX_CLOCK_UPDATE_MAX_RATE_ADJUST].
/// For more info, see `zx_clock_update`. If not specified, use the reference clock's
/// default rate.
///
/// Optional.
1: rate_adjust int32;
/// Starting delta between the reference clock passed to AudioRenderer or Capturer
/// and the system monotonic clock. If not specified, do not adjust reference clock offset.
///
/// Optional.
2: offset int32;
};