getAudioDevices method
Returns the list of available audio devices.
Implementation
Future<List<VIAudioDevice>> getAudioDevices() async {
List<int>? data =
await _channel.invokeListMethod<int>('AudioDevice.getAudioDevices');
if (data == null) {
_VILog._e(
'VIAudioDeviceManager: getAudioDevices: devices were null, skipping');
throw VIException(
VIClientError.ERROR_INTERNAL,
'VIAudioDeviceManager:getAudioDevices: devices were null',
);
}
List<VIAudioDevice> newAudioDevices = [];
for (int device in data) {
newAudioDevices.add(VIAudioDevice.values[device]);
}
return newAudioDevices;
}