Switch: Configure audio drivers to be in blocking mode initially #18459
+4
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On switch homebrew all available audio drivers configure themselves into non blocking mode if the config setting audio_block_frames is zero. This seems to be the default. The setting doesn't seem to be reachable via the ui and the only other place I found it being used was the OpenSL audio driver where the setting can influence buffer sizes.
There is also a comment stating that an audio driver should be in blocking mode by default. The result of switch audio drivers being in non blocking mode even though they shouldn't be is that a lot of audio frames are being dropped when the driver's buffer is full. This is more likely when using the audio callback as it is designed to continuously run until all buffers are full.
The Skeletor example project can be used to test the issue. With the fixes in this PR the example plays fine as on other platforms.