CRITICAL - audio sample rate issue Unreal 5.4.3 - Switch build

Description:
We are encountering an intermittent but persistent audio issue on a Nintendo Switch build created with Unreal Engine 5.4.3. Occasionally, the audio playback drops in sample rate, resulting in a pitch shift and slowed/stretch playback. While the issue cannot be systematically reproduced, once it occurs, it persists until the game is either restarted or the player exits to the Nintendo Switch main menu and reopens the game. This temporary fix is the only known way to resolve the issue.


Reproduction Steps (Intermittent):

  1. Build the game using the default platform-specific settings for Nintendo Switch.
  2. Launch the game on a Nintendo Switch device.
  3. Play the game and observe audio playback. The issue occurs intermittently and inconsistently, but once it manifests, it persists until the game is restarted or reopened via the Switch main menu.

Details:

  • Audio Format: All audio files are WAV PCM 48kHz 24-bit.
  • Compression: Bink audio compression with default parameters.
  • Attempted Fixes:
    1. Clamping the resampling rate to 48kHz in platform-specific settings: No improvement.
    2. Increasing chunk size and memory allocations: No improvement.
    3. Debugging CPU performance: No issues found.
  • File Specs: Audio files are a maximum of 3 minutes in length and 70MB in size. No channel or memory limits were exceeded.
  • Temporary Fix: The only way to momentarily resolve the issue is to exit to the Nintendo Switch main menu and reopen the game, or restart the game entirely.

Observations:

  • Inconsistent Onset: The issue does not always occur and cannot be systematically reproduced. However, it happens frequently enough to disrupt gameplay.
  • Persistent Behavior: Once the issue begins during a session, it remains active until the game is restarted or reopened via the Switch main menu.
  • Similar Issue Reference: The problem resembles one reported on the forums here: Critical: Audio Sounds Choppy on Switch. However, our symptoms specifically involve sample rate and playback speed issues rather than choppiness.
  • Platform-Specific Settings: We used the default platform-specific settings for Switch, with no success in identifying a root cause through configuration changes or debugging.

Request:
We are requesting assistance to identify and resolve the root cause of this issue. Given its critical nature and the lack of a systematic workaround, we urgently need guidance on potential fixes or debugging steps to mitigate this problem.

Thank you for your support.

Good morning, @afederici !

I hope all is well.

Have you been able to resolve the issue?

I’ve checked the post you shared where another user was having a related issue, and it appears his issue creates choppy audio playback (very likely related to CPU stutters).

The issue you’ve described is indeed a bit strange. It would seem as if the sample rate may be changing halfway through a testing session. It’s a bit difficult to provide a clear solution or recommendation without profiling data, but I could provide some thoughts and potential tests that may help pinpoint and fix the issue! First, a couple questions:

1.- Are you running the game’s audio natively or using audio middleware (FMOD/Wwise/etc.)?
2.- Would you mind providing profiling data that corresponds to the issue occurring?
3.- Would you mind sharing the audio settings for your Switch exports?

Unfortunately, the Nintendo Switch’s audio playback+processing capabilities remain a bit restrictive in comparison to PC and other consoles (particularly CPU-bound operations)… As a result, you may want to restrict active voice count/max concurrent voices more aggressively than other platforms.

I’d check profiling data (session frontend in UE5, or audio middleware profilers) before and after the issue triggers in order to find potential triggers. I’d particularly hunt for active voice counts being particularly high, as a well as on-the-fly conversions / resampling of audio events during runtime (further adding to CPU costs).

Could experiment with a sample rate of 44.1kHz, and ensuring similar platform settings when creating a Switch build. Would also double check the audio asset format for the files present in the project.

Worth checking out!:

Hope this is of some use. Happy to delve deeper!

Kindly,
Eric