menu
 

La section Questions et réponses de la communauté Audiokinetic est un forum où les utilisateurs de Wwise et de Strata peuvent poser des questions et répondre à celles des autres membres de la communauté. Si vous souhaitez obtenir une réponse de la part de l'équipe de soutien technique d'Audiokinetic, veillez à utiliser le formulaire de Tickets de Soutien.

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! :)

 

dans General Discussion par Eric N. (140 points)

1 Réponse

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.

par Samuel L. (Audiokinetic) (23.6k 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?
...