FetchAudioInputs (Unreal Engine)

- Declaration

static void FetchAudioInputs(CavrnusAvailableInputDevices OnReceiveDevices);

Delegates Options:

DECLARE_DYNAMIC_DELEGATE_OneParam(FCavrnusAvailableInputDevices, const TArray<FCavrnusInputDevice>&, InputDevices);

typedef TFunction<void(const TArray<FCavrnusInputDevice>&)> CavrnusAvailableInputDevices;

- Description

Provides a list of available microphones. This function is basically only useful if you wished to build your own version of the default voice/video UI.

- Blueprint Sample

FetchAudioInputs.png
Audio Video Selection Widget

- Code Sample

#include "CavrnusFunctionLibrary.h" #include "Types/CavrnusCallbackTypes.h" #include "Types/CavrnusInputDevice.h" void UClassName::Initialize() { // Member is FCavrnusAvailableInputDevices InputDevicesDelegate; InputDevicesDelegate.BindUFunction(this, GET_FUNCTION_NAME_CHECKED(UClassName, OnAudioInputDevicesReceived)); } void UClassName::OnAudioInputDevicesReceived(const TArray<FCavrnusInputDevice>& InputDevices) { // Member is TMap<FString, FCavrnusInputDevice> AudioInputDeviceList; AudioInputDeviceList.Empty(InputDevices.Num()) for (auto InputDevice : InputDevices) { AudioInputDeviceList.Add(InputDevice.DeviceId, InputDevice); } }

Related pages