fuchsia_audio_device/lib.rs
1// Copyright 2019 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5//! Fuchsia Audio Device Library
6//!
7//! Provides a method to create audio devices that are backed by software in Fuchsia.
8//!
9//! SoftStreamConfig creates a StreamConfig client that is suitable for adding to
10//! [[fuchsia.media.AudioDeviceEnumerator]] via AddDeviceByChannel or
11//! [[fuchsia.audio.device.Provider]] via AddDevice. It produces either an
12//! AudioFrameStream (for output audio) or an AudioFrameSink (for input audio)
13//!
14//! SoftCodec creates a Codec client suitable for adding to [[fuchsia.audio.device.Provider]]
15//! via AddCodec. It provides a CodecDevice to capture and respond to control events from Media,
16//! and shutdown the Codec (retrieving a new Codec client which can be used to re-add the Codec)
17
18#![recursion_limit = "256"]
19
20pub use crate::types::{Error, Result};
21
22/// Generic types
23#[macro_use]
24mod types;
25
26/// Software Stream Config Audio Input/Output
27pub mod stream_config;
28
29/// Audio Frame Stream (output stream)
30/// Produces audio packets as if it was an audio output using a [`stream_config::SoftStreamConfig`]
31pub mod audio_frame_stream;
32
33pub use audio_frame_stream::AudioFrameStream;
34
35/// Audio Frame Sink (input sink)
36/// Acts as a microphone or audio input, accepting audio packets using a
37/// [`stream_config::SoftStreamConfig`]
38pub mod audio_frame_sink;
39
40pub use audio_frame_sink::AudioFrameSink;
41
42/// Software Codec Audio Input/Output
43pub mod codec;
44
45/// Frame VMO Helper module
46mod frame_vmo;