Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Wwise 2019.2.12 changes Mac system default sample rate upon initialization

0 votes

Hi! I am looking into an issue where the game I work on changes the sample rate of Mac's default device (which is configurable in Applications/Utilities/Audio MIDI Setup).  According to your documentation here it states:

By default on Mac, Wwise takes the system default device's configuration.

From my personal testing I have not been able to verify that this actually happens. If I set the default system sample rate to 96 kHz and start up my game then it always ends up changing it to 48kHz unless I override uSampleRate to be 96000. I have tried initializing the sound engine in two ways, which both changed the system's sample rate to 48kHz on my mac running BigSur, version 11.2.3.

The first method I tried was:

AK::SoundEngine::Init( NULL, NULL )

And the second method I tried was:

AkInitSettings initSettings;
AkPlatformInitSettings platformInitSettings;
AK::SoundEngine::GetDefaultInitSettings( initSettings );
AK::SoundEngine::GetDefaultPlatformInitSettings( platformInitSettings );
AK::SoundEngine::Init( &initSettings, &platformInitSettings )

Both of these methods changed the default sample rate from 96kHz to 48kHz. The only way I could get the default audio device to stay at 96kHz was by modifying platformInitSettings like so:

platformInitSettings.uSampleRate = 96000;

According to your documentation, I would have expected passing in NULL to AK::SoundEngine::Init to give me the system's default settings. I would like clarification if that should be the case and this should be considered a defect or if I just need to get the sample rate myself through core audio. Thanks! :)


asked Oct 22, 2021 in General Discussion by Eric N. (110 points)

1 Answer

0 votes

As highlighted here, on macOS the default value for the sample rate is 48 kHz. There are cases where the sample rate is required to be the same at bank generation compared and runtime (e.g., Convolution Reverb), so using the default 48 kHz and leaving resampling to the system's sample rate is the most compatible setup. If your use case requires 96 kHz specifically, you can indeed override the value as you did.

However, if by overriding the sample rate it ends up changing your system device's sample rate at game startup, this sounds like a bug: you can report this issue using the Bug Reporter.

answered Oct 26, 2021 by Samuel L. (Audiokinetic) (23,300 points)
I submitted a bug report on the 22nd of November, 2021 about this given that you said I should if Wwise was actually changing the system device's sample rate. We recently upgraded to Wwise 2021.1.6 and I can confirm that this is still an issue and that the default output device's sample rate gets changed on MacOS when initializing Wwise. Should I submit another bug report for that? If we put a paid support ticket in will that escalate a fix for this?