UpdateAudioInput (Unreal Engine)
- Declaration
static void UpdateAudioInput(FCavrnusInputDevice Device);
- Description
Sets which microphone the user wishes to use. Note that the FCavrnusInputDevice
provided to this function can only be acquired by calling FetchAudioInputs to search for available microphones.
- Blueprint Sample
Sample is taken from WBP_AudioVideoWidget.uasset in the Plugin. AudioInputDeviceResponse is a Blueprint array of FCavrnusInputDevice
instances that was provided earlier via Fetch Audio Inputs.
Â
WBP_AudioVideoWidget
- Code Sample
#include "CavrnusFunctionLibrary.h"
#include "Types/CavrnusInputDevice.h"
void UClassName::OnAudioInputDeviceSelected(const FString& DeviceId)
{
// Member is TMap<FString, FCavrnusInputDevice> AudioInputDeviceList;
FCavrnusInputDevice* InputDevice = AudioInputDeviceList.Find(DeviceId);
if (InputDevice)
{
UCavrnusFunctionLibrary::UpdateAudioInput(*InputDevice);
}
else
{
UE_LOG(LogTemp, Warning, TEXT("Selected Audio Input Device not found: %s"), *DeviceId);
}
}