pub struct AudioDeviceEnumeratorProxy { /* private fields */ }
Implementations§
Source§impl AudioDeviceEnumeratorProxy
impl AudioDeviceEnumeratorProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.media/AudioDeviceEnumerator.
Sourcepub fn take_event_stream(&self) -> AudioDeviceEnumeratorEventStream
pub fn take_event_stream(&self) -> AudioDeviceEnumeratorEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_devices(
&self,
) -> QueryResponseFut<Vec<AudioDeviceInfo>, DefaultFuchsiaResourceDialect>
pub fn get_devices( &self, ) -> QueryResponseFut<Vec<AudioDeviceInfo>, DefaultFuchsiaResourceDialect>
Obtain the list of currently active audio devices.
Sourcepub fn get_device_gain(
&self,
device_token: u64,
) -> QueryResponseFut<(u64, AudioGainInfo), DefaultFuchsiaResourceDialect>
pub fn get_device_gain( &self, device_token: u64, ) -> QueryResponseFut<(u64, AudioGainInfo), DefaultFuchsiaResourceDialect>
Gain/Mute/AGC control
Note that each of these operations requires a device_token in order to target the proper input/output.
The Get command returns the device_token of the device whose gain is
being reported, or ZX_KOID_INVALID
in the case that the requested
device_token was invalid or the device had been removed from the system
before the Get command could be processed.
Set commands which are given an invalid device token are ignored and have no effect on the system. In addition, users do not need to control all of the gain settings for an audio device with each call. Only the settings with a corresponding flag set in the set_flags parameter will be affected. For example, passing SetAudioGainFlag_MuteValid will cause a SetDeviceGain call to care only about the mute setting in the gain_info structure, while passing (SetAudioGainFlag_GainValid | SetAudioGainFlag_MuteValid) will cause both the mute and the gain status to be changed simultaneously.
pub fn set_device_gain( &self, device_token: u64, gain_info: &AudioGainInfo, valid_flags: AudioGainValidFlags, ) -> Result<(), Error>
Sourcepub fn add_device_by_channel(
&self,
device_name: &str,
is_input: bool,
channel: ClientEnd<StreamConfigMarker>,
) -> Result<(), Error>
pub fn add_device_by_channel( &self, device_name: &str, is_input: bool, channel: ClientEnd<StreamConfigMarker>, ) -> Result<(), Error>
§Deprecation
StreamConfig is not supported anymore, instead use an Audio Composite , see Audio Drivers Architecture
Trait Implementations§
Source§impl AudioDeviceEnumeratorProxyInterface for AudioDeviceEnumeratorProxy
impl AudioDeviceEnumeratorProxyInterface for AudioDeviceEnumeratorProxy
type GetDevicesResponseFut = QueryResponseFut<Vec<AudioDeviceInfo>>
type GetDeviceGainResponseFut = QueryResponseFut<(u64, AudioGainInfo)>
fn get_devices(&self) -> Self::GetDevicesResponseFut
fn get_device_gain(&self, device_token: u64) -> Self::GetDeviceGainResponseFut
fn set_device_gain( &self, device_token: u64, gain_info: &AudioGainInfo, valid_flags: AudioGainValidFlags, ) -> Result<(), Error>
fn add_device_by_channel( &self, device_name: &str, is_input: bool, channel: ClientEnd<StreamConfigMarker>, ) -> Result<(), Error>
Source§impl Clone for AudioDeviceEnumeratorProxy
impl Clone for AudioDeviceEnumeratorProxy
Source§fn clone(&self) -> AudioDeviceEnumeratorProxy
fn clone(&self) -> AudioDeviceEnumeratorProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AudioDeviceEnumeratorProxy
impl Debug for AudioDeviceEnumeratorProxy
Source§impl Proxy for AudioDeviceEnumeratorProxy
impl Proxy for AudioDeviceEnumeratorProxy
Source§type Protocol = AudioDeviceEnumeratorMarker
type Protocol = AudioDeviceEnumeratorMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for AudioDeviceEnumeratorProxy
impl !RefUnwindSafe for AudioDeviceEnumeratorProxy
impl Send for AudioDeviceEnumeratorProxy
impl Sync for AudioDeviceEnumeratorProxy
impl Unpin for AudioDeviceEnumeratorProxy
impl !UnwindSafe for AudioDeviceEnumeratorProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)