pub fn set_input_device(
device_service: State<'_, DeviceService>,
audio_service: State<'_, Mutex<AudioService>>,
device_id: String,
) -> Result<(), String>Expand description
Switches the active input device.
Looks up the device by ID in the DeviceService, then delegates to
AudioService::set_input_device to perform the hot-swap without interrupting
playback longer than necessary.
§Arguments
device_service- The sharedDeviceServicestate for device lookup.audio_service- The sharedAudioServicestate for performing the switch.device_id- The ID of the input device to activate.
§Returns
Returns Ok(()) on success, or Err(String) if the device ID is not found
or the service state cannot be locked.