Skip to content

sdl_audio: Remove buffer samples hint. #2038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2025

Conversation

squidbus
Copy link
Collaborator

@squidbus squidbus commented Jan 3, 2025

Remove the hint for buffer sample frames as this seems to not work right on some systems.

@C0rn3j
Copy link
Contributor

C0rn3j commented Jan 3, 2025

I can still trigger the audio issues, but only extremely briefly and only with artificial load from stress when combined with compiling shaders.

That is to say, this PR fixes my issues in #2015.

[Render.Vulkan] <Info> vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0xd506a1 
[Render.Vulkan] <Info> vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0xf81310f4 
[Lib.AudioOut] <Warning> sdl_audio.cpp:Output:64: SDL audio queue backed up (131072 queued, 131072 threshold), clearing.
[Lib.AudioOut] <Warning> sdl_audio.cpp:Output:64: SDL audio queue backed up (131072 queued, 131072 threshold), clearing.
[Render.Vulkan] <Info> vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x6a833138 (permutation)
[Render.Vulkan] <Info> vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0x2390c887 
[Render.Vulkan] <Info> vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x97f2d384 (permutation)
[Render.Vulkan] <Info> vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0x6b42fc89 
[Render.Vulkan] <Info> vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x8747a367 (permutation)
[Render.Vulkan] <Info> vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0x8d5387d9 
[Render.Vulkan] <Info> vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0x8aba0ecd 
[Render.Vulkan] <Info> vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x7620368b 
[Lib.AudioOut] <Warning> sdl_audio.cpp:Output:64: SDL audio queue backed up (131072 queued, 131072 threshold), clearing.

@squidbus
Copy link
Collaborator Author

squidbus commented Jan 3, 2025

I can still trigger the audio issues, but only extremely briefly and only with artificial load from stress when combined with compiling shaders.

That is to say, this PR fixes my issues in #2015.

Thanks for confirming, yeah if the system is sufficiently stressed and the audio output can't keep up we don't have much of a choice to maintain proper pacing but to drop frames.

@NetQvist
Copy link

NetQvist commented Jan 3, 2025

Can confirm that this also fixes the constant crackling noise whenever audio was being played if audio was routed through the Steelseries Sonar mixer in Windows.

@georgemoralis georgemoralis merged commit f42b8ac into shadps4-emu:main Jan 4, 2025
10 checks passed
@killstriker64
Copy link

Screenshot 2025-01-21 020417
I constantly get this error in Bloodborne CUSA03173. Every time it occurs, the game starts to lag and the sound begins to buzz. Maybe it is related to this PR so i posted this problem here. There is no such problem with 0.5.0.

@C0rn3j
Copy link
Contributor

C0rn3j commented Jan 21, 2025

I think you're inverting the cause and effect.

The emulator can't keep up for some reason (CPU, VRAM, RAM, a bug, ...), so it fails to keep rendering the game and playing audio.

If you believe this PR is at fault, test both with the commit before it and the PR commit.

diegolix29 added a commit to diegolix29/shadPS4 that referenced this pull request Jan 22, 2025
@squidbus squidbus deleted the sdl-audio-hint branch January 27, 2025 12:53
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.

5 participants