blob: ff44fdf50ec64d01024a79e5951ca5480aa9110b [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(perley): migrate users needing this to AudioCore and remove from Audio
SetSystemMute(bool muted);
SetSystemGain(float32 gain_db);
-> SystemGainMuteChanged(float32 gain_db, bool muted);
SetRoutingPolicy(AudioOutputRoutingPolicy policy);
};
// 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;