Skip to content

Switch: Configure audio drivers to be in blocking mode initially#18459

Open
diekleinekuh wants to merge 1 commit intolibretro:masterfrom
diekleinekuh:switch_audio_drivers_initially_blocking
Open

Switch: Configure audio drivers to be in blocking mode initially#18459
diekleinekuh wants to merge 1 commit intolibretro:masterfrom
diekleinekuh:switch_audio_drivers_initially_blocking

Conversation

@diekleinekuh
Copy link
Copy Markdown

@diekleinekuh diekleinekuh commented Nov 29, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant