Fmod prefers 48khz even though sound card is using 44.1

Hi everyone,

I understand that Fmod picks the correct sample rate depending on the sound card. Is that true?

My sound card is configured to run at 44.1khz, but Fmod chooses 48khz. Why is that?

FMOD.Studio.System.create(out sys);
sys.getCoreSystem(out coreSystem);
coreSystem.getSoftwareFormat(out var SystemPreferredSamplerate, out _, out _);
// SystemPreferredSamplerate is 48000 even though the sound card runs on 44100

FMOD has a default sample rate, generally 48KHz, this is the rate the engine runs at. To support all the different sound devices in the world, we resample from that rate to the desired rate of the hardware as a final step when delivering audio to the sound card. Some users have their audio devices set to extreme values, so while you can set the FMOD engine to run at the hardware sample rate, it’s generally avoided.

Thanks mathew. So if the soundcard runs at 44.1 and the source audio file is 44.1, Fmod will by default upsample to 48khz and then back down to 44.1.

In this scenario, If I set Fmod to run at 44.1, then I would save on two resampling operations - thereby reducing CPU usage by a tiny amount. Is that correct?

Yes, that’s correct on all counts.

Be aware that any pitch manipulation on Events or Busses will cause their resamplers to come back though.

1 Like

If the audio file is 44.1 kHz, FMOD will up sample to 48 kHz by default. Will this change the pitch of the sound? If not, how to maintain the pitch with resample ?

A 44.1kHz sample will be resampled to 48kHz by default. This will not change the pitch of the sound, that only happens when a sample is resampled to a rate different from the rate the playback device operates at.