pub enum AudioDeviceEnumeratorRequest {
GetDevices {
responder: AudioDeviceEnumeratorGetDevicesResponder,
},
GetDeviceGain {
device_token: u64,
responder: AudioDeviceEnumeratorGetDeviceGainResponder,
},
SetDeviceGain {
device_token: u64,
gain_info: AudioGainInfo,
valid_flags: AudioGainValidFlags,
control_handle: AudioDeviceEnumeratorControlHandle,
},
AddDeviceByChannel {
device_name: String,
is_input: bool,
channel: ClientEnd<StreamConfigMarker>,
control_handle: AudioDeviceEnumeratorControlHandle,
},
}
Variants§
GetDevices
Obtain the list of currently active audio devices.
Fields
responder: AudioDeviceEnumeratorGetDevicesResponder
GetDeviceGain
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.
SetDeviceGain
Fields
gain_info: AudioGainInfo
valid_flags: AudioGainValidFlags
control_handle: AudioDeviceEnumeratorControlHandle
AddDeviceByChannel
§Deprecation
StreamConfig is not supported anymore, instead use an Audio Composite , see Audio Drivers Architecture
Implementations§
Source§impl AudioDeviceEnumeratorRequest
impl AudioDeviceEnumeratorRequest
pub fn into_get_devices( self, ) -> Option<AudioDeviceEnumeratorGetDevicesResponder>
pub fn into_get_device_gain( self, ) -> Option<(u64, AudioDeviceEnumeratorGetDeviceGainResponder)>
pub fn into_set_device_gain( self, ) -> Option<(u64, AudioGainInfo, AudioGainValidFlags, AudioDeviceEnumeratorControlHandle)>
pub fn into_add_device_by_channel( self, ) -> Option<(String, bool, ClientEnd<StreamConfigMarker>, AudioDeviceEnumeratorControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL