Changing Audio Output Device

So I’m trying to change the output device for my audio but I’m not having much luck.

I get both of my computer’s audio devices and it doesn’t seem to matter which I set to be the active device, the sound output stays the same.

Another interesting thing is that Inside each FAudioDevice, when I call GetAudioDeviceList, both FAudioDevice return the same two string names of the actual audio devices which are correct.

Has anyone dealt with this before?

This is how I’m getting the Audio Devices.

TArray<FAudioDeviceInfo> Devices;
if (GEngine)
{
	TArray<FAudioDevice*>& AudioDevices = GEngine->GetAudioDeviceManager()->GetAudioDevices();
	for (FAudioDevice* Device : AudioDevices)
	{
		if (Device)
		{
			TArray<FString> DeviceNames;
			Device->GetAudioDeviceList(DeviceNames);
			for (FString DeviceName : DeviceNames)
			{
				Devices.Add(FAudioDeviceInfo((int32)Device->DeviceHandle, DeviceName));
			}
		}
	}
}
return Devices;

This code returns ends up creating 4 FAudioDeviceInfo. 2 with handle 0 and the correct Audio Device names. 2 with handle 1 and the correct Audio Device names.

This is how I’m setting the new active device where InNewSoundOutput is the handle for the Audio Device.

if (GEngine)
{
	GEngine->GetAudioDeviceManager()->SetActiveDevice((uint32)InNewSoundOutput);
}

Did you ever get this to work? I’m looking to change the audio output device as well.

No, I did not.

This Wwise plugin looks to be good. I haven’t tried it, but may have to look into it.

Tutorial:
https://zen.yandex.ru/media/id/5ea844c950c3275eb74e4a75/implementing-two-audio-devices-to-your-ue-game-using-wwise-5ea844f6007c871a159049a5

Plugin:
https://www.audiokinetic.com/products/wwise/