UE4 4.14 recording devices not immediately available

Hi!

We’ve been using FMOD for recording in an UE4 application, and we recently moved from 4.12 to 4.14. In 4.12, we used to retrieve the available recording devices from the PlayerController’s BeginPlay function using

StudioSystem = IFMODStudioModule::Get().GetStudioSystem(EFMODSystemContext::Runtime);

FMOD::System* System;
check(StudioSystem->getLowLevelSystem(&System) == FMOD_OK);

int NumDrivers, NumDevices;

System->getRecordNumDrivers(&NumDrivers, &NumDevices);

This always gave us the correct amount of recording devices available. However, since we upgraded UE and FMOD to 4.14, both NumDrivers and NumDevices would always be 0 at this point.
After some more testing, I found out they do become available, but only after running the application for over 1 second. I tested this by repeatedly using the above code in the Tick function.

Is this expected, and am I missing a new step required in 4.14?

edit:

To verify this is not caused by my local project, I’ve set up a new UE4.14 project (blank C++ project), and added this simple code to the implementation file of the standard GameModeBase class:

AFMODMicGameModeBase::AFMODMicGameModeBase()
{
	PrimaryActorTick.bCanEverTick = true;
}

void Test()
{
	FMOD::Studio::System* StudioSystem = IFMODStudioModule::Get().GetStudioSystem(EFMODSystemContext::Runtime);

	FMOD::System* System;

	check(StudioSystem->getLowLevelSystem(&System) == FMOD_OK);

	int NumDrivers, NumDevices;

	System->getRecordNumDrivers(&NumDrivers, &NumDevices);

	UE_LOG(LogTemp, Warning, TEXT("Drivers: %i  Devices: %i"), NumDrivers, NumDevices);
}

void AFMODMicGameModeBase::BeginPlay()
{
	Super::BeginPlay();

	Test();
}

void AFMODMicGameModeBase::Tick(float DeltaSeconds)
{
	Super::Tick(DeltaSeconds);

	Test();
}

The behavior is the same in this project, the drivers and devices only show up after about 1.2 seconds.

It is a bug, at the moment if the recording devices are queried within approx 2 seconds of the system being initialized it will not pick up the devices.

The fix for this will be in our next release, next week.
In the meantime the only suggestion is to wait those two seconds.

1 Like

Thanks for the reply, I’ll wait for that update then! Happy new year!

Hi Cameron!
Has this bug been solved yet? I haven’t seen a new version appear since my original question!
Cheers!

It has been fixed but we didn’t end up having a release at the end of December, sorry about that. Our next release will be next week (start of Feb).

Thanks! :slight_smile: