blob: 4a6bcdafa3ce8588969d12e07b001eb8f76e76ee [file] [log] [blame]
// Copyright 2016 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.media;
[Discoverable]
protocol Audio {
CreateAudioRenderer(request<AudioRenderer> audio_renderer_request);
/// Create an AudioCapturer which either captures from the current default
/// audio input device, or loops-back from the current default audio output
/// device based on value passed for the loopback flag.
///
// TODO(mpuryear): Get rid of the loopback flag ASAP. Routing decisions (and
// security surrounding routing decisions) should be much more sophisticated
// than this. This is just a placeholder until we have a design in place.
// Eventually, I suspect that all of this will move up into the audio policy
// manager and application clients will obtain AudioCapturers from and control
// through the policy manager.
CreateAudioCapturer(request<AudioCapturer> audio_capturer_request,
bool loopback);
// TODO(38104): Remove these methods.
[Transitional, Deprecated]
SetSystemMute(bool muted);
[Transitional, Deprecated]
SetSystemGain(float32 gain_db);
[Transitional, Deprecated]
-> SystemGainMuteChanged(float32 gain_db, bool muted);
};
/// Permitted ranges for AudioRenderer and AudioCapturer
const uint32 MIN_PCM_CHANNEL_COUNT = 1;
const uint32 MAX_PCM_CHANNEL_COUNT = 8;
const uint32 MIN_PCM_FRAMES_PER_SECOND = 1000;
const uint32 MAX_PCM_FRAMES_PER_SECOND = 192000;