fidl_fuchsia_media

Enum AudioCoreRequest

Source
pub enum AudioCoreRequest {
    CreateAudioRenderer {
        audio_out_request: ServerEnd<AudioRendererMarker>,
        control_handle: AudioCoreControlHandle,
    },
    CreateAudioCapturerWithConfiguration {
        stream_type: AudioStreamType,
        configuration: AudioCapturerConfiguration,
        audio_capturer_request: ServerEnd<AudioCapturerMarker>,
        control_handle: AudioCoreControlHandle,
    },
    CreateAudioCapturer {
        loopback: bool,
        audio_in_request: ServerEnd<AudioCapturerMarker>,
        control_handle: AudioCoreControlHandle,
    },
    EnableDeviceSettings {
        enabled: bool,
        control_handle: AudioCoreControlHandle,
    },
    SetRenderUsageGain {
        usage: AudioRenderUsage,
        gain_db: f32,
        control_handle: AudioCoreControlHandle,
    },
    SetCaptureUsageGain {
        usage: AudioCaptureUsage,
        gain_db: f32,
        control_handle: AudioCoreControlHandle,
    },
    BindUsageVolumeControl {
        usage: Usage,
        volume_control: ServerEnd<VolumeControlMarker>,
        control_handle: AudioCoreControlHandle,
    },
    GetVolumeFromDb {
        usage: Usage,
        gain_db: f32,
        responder: AudioCoreGetVolumeFromDbResponder,
    },
    GetDbFromVolume {
        usage: Usage,
        volume: f32,
        responder: AudioCoreGetDbFromVolumeResponder,
    },
    SetInteraction {
        active: Usage,
        affected: Usage,
        behavior: Behavior,
        control_handle: AudioCoreControlHandle,
    },
    ResetInteractions {
        control_handle: AudioCoreControlHandle,
    },
    LoadDefaults {
        control_handle: AudioCoreControlHandle,
    },
}

Variants§

§

CreateAudioRenderer

Creates an AudioRenderer which outputs audio to the default device.

Fields

§audio_out_request: ServerEnd<AudioRendererMarker>
§control_handle: AudioCoreControlHandle
§

CreateAudioCapturerWithConfiguration

Creates an AudioCapturer according to the given requirements.

pcm_stream_type sets the stream type of the stream to be delivered. It causes the source material to be reformatted/resampled if needed in order to produce the requested stream type.

usage is used by Fuchsia to make decisions about user experience. See AudioCaptureUsage for more details.

configuration must be initialized to a variant, or no capturer can be created.

Fields

§stream_type: AudioStreamType
§audio_capturer_request: ServerEnd<AudioCapturerMarker>
§control_handle: AudioCoreControlHandle
§

CreateAudioCapturer

Creates 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.

Fields

§loopback: bool
§audio_in_request: ServerEnd<AudioCapturerMarker>
§control_handle: AudioCoreControlHandle
§

EnableDeviceSettings

Fields

§enabled: bool
§control_handle: AudioCoreControlHandle
§

SetRenderUsageGain

Sets the Usage gain applied to Renderers. By default, the gain for all render usages is set to Unity (0 db).

Fields

§gain_db: f32
§control_handle: AudioCoreControlHandle
§

SetCaptureUsageGain

Sets the Usage gain applied to Capturers. By default, the gain for all capture usages is set to Unity (0 db).

Fields

§gain_db: f32
§control_handle: AudioCoreControlHandle
§

BindUsageVolumeControl

Binds to a volume control protocol for the given usage.

Fields

§usage: Usage
§volume_control: ServerEnd<VolumeControlMarker>
§control_handle: AudioCoreControlHandle
§

GetVolumeFromDb

Queries the volume percentage [0, 1] that maps to a gain_db value for a particular usage. This is the same mapping as used by the VolumeControl from BindUsageVolumeControl.

Fields

§usage: Usage
§gain_db: f32
§

GetDbFromVolume

Queries the decibel value that maps to a volume percentage [0, 1] for a particular usage. This is the same mapping as used by the VolumeControl from BindUsageVolumeControl.

Fields

§usage: Usage
§volume: f32
§

SetInteraction

Sets how audio_core handles interactions of multiple active streams simultaneously. If streams of Usage active are processing audio, and streams of Usage affected are as well, the Behavior specified will be applied to the streams of Usage affected.

Fields

§active: Usage
§affected: Usage
§behavior: Behavior
§control_handle: AudioCoreControlHandle
§

ResetInteractions

Re-initializes the set of rules that are currently governing the interaction of streams in audio_core. The default behavior is ‘NONE’.

Fields

§control_handle: AudioCoreControlHandle
§

LoadDefaults

Re-loads the platform policy configuration. Falls back to a default config if the platform does not provide a config.

Fields

§control_handle: AudioCoreControlHandle

Implementations§

Trait Implementations§

Source§

impl Debug for AudioCoreRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more