Enum AudioCoreRequest

Source
pub enum AudioCoreRequest {
Show 19 variants 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, }, SetRenderUsageGain2 { usage: AudioRenderUsage2, gain_db: f32, control_handle: AudioCoreControlHandle, }, SetCaptureUsageGain { usage: AudioCaptureUsage, gain_db: f32, control_handle: AudioCoreControlHandle, }, SetCaptureUsageGain2 { usage: AudioCaptureUsage2, gain_db: f32, control_handle: AudioCoreControlHandle, }, BindUsageVolumeControl { usage: Usage, volume_control: ServerEnd<VolumeControlMarker>, control_handle: AudioCoreControlHandle, }, BindUsageVolumeControl2 { usage: Usage2, volume_control: ServerEnd<VolumeControlMarker>, control_handle: AudioCoreControlHandle, }, GetVolumeFromDb { usage: Usage, gain_db: f32, responder: AudioCoreGetVolumeFromDbResponder, }, GetVolumeFromDb2 { usage: Usage2, gain_db: f32, responder: AudioCoreGetVolumeFromDb2Responder, }, GetDbFromVolume { usage: Usage, volume: f32, responder: AudioCoreGetDbFromVolumeResponder, }, GetDbFromVolume2 { usage: Usage2, volume: f32, responder: AudioCoreGetDbFromVolume2Responder, }, SetInteraction { active: Usage, affected: Usage, behavior: Behavior, control_handle: AudioCoreControlHandle, }, SetInteraction2 { active: Usage2, affected: Usage2, behavior: Behavior, control_handle: AudioCoreControlHandle, }, ResetInteractions { control_handle: AudioCoreControlHandle, }, LoadDefaults { control_handle: AudioCoreControlHandle, }, _UnknownMethod { ordinal: u64, control_handle: AudioCoreControlHandle, method_type: MethodType, },
}

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 gain for this render usage. By default, all render usages are set to Unity (0 db).

Fields

§gain_db: f32
§control_handle: AudioCoreControlHandle
§

SetRenderUsageGain2

Sets the gain for this render usage. By default, all render usages are set to Unity (0 db).

Fields

§gain_db: f32
§control_handle: AudioCoreControlHandle
§

SetCaptureUsageGain

Sets gain for this capture usage. By default, all capture usages are set to Unity (0 db).

Fields

§gain_db: f32
§control_handle: AudioCoreControlHandle
§

SetCaptureUsageGain2

Sets gain for this capture usage. By default, all capture usages are 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
§

BindUsageVolumeControl2

Binds to a volume control protocol for the given usage.

Fields

§usage: Usage2
§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
§

GetVolumeFromDb2

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: Usage2
§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
§

GetDbFromVolume2

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.

§

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
§

SetInteraction2

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: Usage2
§affected: Usage2
§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
§

_UnknownMethod

An interaction was received which does not match any known method.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§ordinal: u64

Ordinal of the method that was called.

§control_handle: AudioCoreControlHandle
§method_type: MethodType

Implementations§

Source§

impl AudioCoreRequest

Source

pub fn into_create_audio_renderer( self, ) -> Option<(ServerEnd<AudioRendererMarker>, AudioCoreControlHandle)>

Source

pub fn into_create_audio_capturer_with_configuration( self, ) -> Option<(AudioStreamType, AudioCapturerConfiguration, ServerEnd<AudioCapturerMarker>, AudioCoreControlHandle)>

Source

pub fn into_create_audio_capturer( self, ) -> Option<(bool, ServerEnd<AudioCapturerMarker>, AudioCoreControlHandle)>

Source

pub fn into_enable_device_settings( self, ) -> Option<(bool, AudioCoreControlHandle)>

Source

pub fn into_set_render_usage_gain( self, ) -> Option<(AudioRenderUsage, f32, AudioCoreControlHandle)>

Source

pub fn into_set_render_usage_gain2( self, ) -> Option<(AudioRenderUsage2, f32, AudioCoreControlHandle)>

Source

pub fn into_set_capture_usage_gain( self, ) -> Option<(AudioCaptureUsage, f32, AudioCoreControlHandle)>

Source

pub fn into_set_capture_usage_gain2( self, ) -> Option<(AudioCaptureUsage2, f32, AudioCoreControlHandle)>

Source

pub fn into_bind_usage_volume_control( self, ) -> Option<(Usage, ServerEnd<VolumeControlMarker>, AudioCoreControlHandle)>

Source

pub fn into_bind_usage_volume_control2( self, ) -> Option<(Usage2, ServerEnd<VolumeControlMarker>, AudioCoreControlHandle)>

Source

pub fn into_get_volume_from_db( self, ) -> Option<(Usage, f32, AudioCoreGetVolumeFromDbResponder)>

Source

pub fn into_get_volume_from_db2( self, ) -> Option<(Usage2, f32, AudioCoreGetVolumeFromDb2Responder)>

Source

pub fn into_get_db_from_volume( self, ) -> Option<(Usage, f32, AudioCoreGetDbFromVolumeResponder)>

Source

pub fn into_get_db_from_volume2( self, ) -> Option<(Usage2, f32, AudioCoreGetDbFromVolume2Responder)>

Source

pub fn into_set_interaction( self, ) -> Option<(Usage, Usage, Behavior, AudioCoreControlHandle)>

Source

pub fn into_set_interaction2( self, ) -> Option<(Usage2, Usage2, Behavior, AudioCoreControlHandle)>

Source

pub fn into_reset_interactions(self) -> Option<AudioCoreControlHandle>

Source

pub fn into_load_defaults(self) -> Option<AudioCoreControlHandle>

Source

pub fn method_name(&self) -> &'static str

Name of the method defined in FIDL

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.

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.