mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 15:56:00 +03:00
[GH-ISSUE #1717] There is a sound problem in the new version #590
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#590
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ycb678 on GitHub (Dec 9, 2024).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/1717
The above sound problem occurs in versions after shadps4-win64-qt-fullbb-12-07-12c58e4, but there is no such problem in previous versions
win1124h2 i7-1180h 3060(6GB)
@ycb678 commented on GitHub (Dec 9, 2024):
https://github.com/user-attachments/assets/a18e101a-64b5-4aeb-967a-a4325413dbb8
@Missake212 commented on GitHub (Dec 9, 2024):
You're on a fork, open an issue if you're having an issue on main
@ycb678 commented on GitHub (Dec 9, 2024):
ok
@C0rn3j commented on GitHub (Dec 9, 2024):
@Hermiten please re-open, I can repro on this repo, immediately on the Online/Offline launch screen, this is actually the exact same issue I reported here - https://github.com/shadps4-emu/shadps4-game-compatibility/issues/71#issuecomment-2526317572
Reposting:
Arch Linux, Plasma, Wayland, Nvidia, built from AUR/shadps4-git, using all currently wiki-recommended sys_modules on
github.com/shadps4-emu/shadPS4@fea2593ab4.Had to unset $DISPLAY otherwise the game would be a black screen
unset DISPLAY; shadps4- as per https://github.com/shadps4-emu/shadPS4/issues/1045The game has extremely glitchy audio, it effectively loops a random frequency related to the sound it was trying to do, EXCEPT for playing cutscenes which are crystal clear (it combines the two when both are playing, resulting in this mess + clear audio played together).
Game crashes after the first cutscene in the character creator due to https://github.com/shadps4-emu/shadPS4/issues/1704, working around it gets me past character creation, but the sound remains broken.
shad_log.txt with cc freeze + audio issues, without 1704 workaround
@ngoquang2708 commented on GitHub (Dec 9, 2024):
@C0rn3j For sound problem, I recommend uninstall
sdl3orsdl3-gitand build the emulator manually. Sound only work correctly with the bundledsdl3.@C0rn3j commented on GitHub (Dec 9, 2024):
@ngoquang2708 could you link the relevant tracker with info as to why that is?
I see
-DCMAKE_DISABLE_FIND_PACKAGE_SDL3=ONargument for cmake forces the submodule.I found https://github.com/shadps4-emu/shadPS4/issues/999#issuecomment-2364564592, which simply mentions that OPs version of SDL3 is too new, but no extra details, and all SDL-related issues are closed.
@ngoquang2708 commented on GitHub (Dec 9, 2024):
@C0rn3j I don't have any ideas why it is like that. It just my personal experience.
@ngoquang2708 commented on GitHub (Dec 9, 2024):
@C0rn3j FYI, sound problem happens for me for a long time ago, not just recently.
@C0rn3j commented on GitHub (Dec 9, 2024):
Nope, uninstalled system SDL3, added the CMAKE arg for good measure, added submodule init for sdl, rebuilt from latest git in a clean chroot and it still breaks audio.
Please reopen.
@Virgula0 commented on GitHub (Dec 10, 2024):
Had the same problem with few other games on windows too, and I can confirm the broken audio for Bloodborne on linux (arch using aur bulid) as for @C0rn3j
And the idea to build it manually does not make too much sense since aur re-builds binaries every time by itself.
@ngoquang2708 commented on GitHub (Dec 10, 2024):
We have to build manually because the AUR package use difference version of
sdl3which is incompatible with the emulator.@C0rn3j commented on GitHub (Dec 10, 2024):
Note that that is no longer the case and shad compiles and runs fine with AUR repo SDL3 (currently at latest preview version of 3.1.6).
The resolved issue above about new SDL being broken was failing in the compile stage outright, it had got fixed for current SDL3 in the meantime it seems.
The sound is broken with both bundled SDL3 and AUR/sdl3.
AUR does not do anything by itself, it is just a recipe repository.
@C0rn3j commented on GitHub (Dec 11, 2024):
Is everyone here with the issue on Nvidia?
I've had someone on Arch Linux use the same package and they don't have the issue on an AMD GPU.
OP uses Intel CPU, I use AMD, so the only common denominator seems to be Nvidia, I use 4000 series, Linux and 565.77 open modules.
@ycb678 commented on GitHub (Dec 12, 2024):
@DISREL commented on GitHub (Dec 14, 2024):
I am on MacOS and this issue also persists in the latest build - https://github.com/shadps4-emu/shadPS4/releases/tag/Pre-release-shadPS4-2024-12-14-3e22622
The audio issue starts immediately on the "play online/play offline" menu on launch, just like @C0rn3j.
EDIT: Bit of an update, issue is with the game audio itself. The cutscenes just work fine.
@Virgula0 commented on GitHub (Dec 14, 2024):
NVIDIA card + intel CPU here
@C0rn3j commented on GitHub (Dec 14, 2024):
What hardware is that macOS on? GPU specifically.
I recall old Macs used to have Nvidia.
@DISREL commented on GitHub (Dec 14, 2024):
It is a Macbook Pro 14 inch (M4 Max). I am going to try a couple of different builds and see if I can find a root cause analysis.
@squidbus commented on GitHub (Dec 14, 2024):
I have always had this issue on Mac even before the game was properly bootable so I don't think you'll find much looking back.
@C0rn3j commented on GitHub (Dec 14, 2024):
A friend of mine mentioned they had this issue on Windows some months ago - no longer, however.
So it looks like it may be platform independent, both OS and GPU/CPU, and the changes in the emulator over time just make it trigger on and off on specific setups.
@ycb678 commented on GitHub (Dec 15, 2024):
How do I fix this, the problem still reproduces until now
@MisterNorwood commented on GitHub (Dec 17, 2024):
I can confirm this is an issue on the current main branch build:
Os and Hardware: Arch Linux Ryzen 9 7900X, Radeon RX 7900 XTX
v0.4.1 WIP main v.0.4.0-213-g87773a41
@Zebouski commented on GitHub (Dec 18, 2024):
Yep experiencing this too from Play Online/Offline main menu screen.
Arch linux, i7-6700K CPU, AMD Radeon RX 580
built from AUR shadps4-git, v0.4.1 WIP main v.0.4.0-213-g87773a41
@ngoquang2708 commented on GitHub (Dec 20, 2024):
@C0rn3j Does sound issue happen when run with
SDL_AUDIO_DRIVER=pulseaudioenv set?I believe when you build with system SDL, it will link with PipeWire which cause audio issue. Confirmed on my end.
@C0rn3j commented on GitHub (Dec 20, 2024):
Still happens.
% killall -9 shadps4; unset DISPLAY; export SDL_AUDIO_DRIVER=pulseaudio; SDL_AUDIO_DRIVER=pulseaudio shadps4I do have the issue on both system SDL and shad's builtin SDL version.
EDIT: Verified it is in fact applying by
pw-cli ls | grep -C 10 shad | grep -e id -e alias -e name -e api -e protocoltoo.@MisterNorwood commented on GitHub (Dec 21, 2024):
Overriding SLD audio driver fixed the issue for me. Thank you!
@C0rn3j commented on GitHub (Dec 25, 2024):
I have remembered that I have custom audio settings, which are apparently triggering the issue.
Shad wouldn't be the only software that this breaks, as Tauon had to fix their PW implementation too.
Basically, Tauon expected that the buffer is of a static size, but it is in fact dynamic and can be larger than expected.
Here's an upstream PW issue about this, as apparently this isn't considered kosher handling by PW either for the values I have set - https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4334
Here is my
~/.config/pipewiredirectory which triggers the issue - pipewire.zip - but the relevant parts should be the edited quantum values:EDIT4: I still manage to get the initial glitched audio on default audio configs after closing some applications hooking into the sound system, so it looks like it can still trigger the bug even on defaults.
EDIT5: This is a bit over my head, but isn't shad completely ignoring the system buffers and just hardcoding it?
github.com/shadps4-emu/shadPS4@0bb1c05aff/src/core/libraries/audio/sdl_audio.cpp (L13)EDIT: Huh, actually most sounds are missing but at least it now doesn't violate my ears:
https://www.youtube.com/watch?v=0KyZZWzIsEw
On the video one can only hear the enemies in the background and wind blowing, none of the sounds my character should be making are there.
Happens on both PW+Pulse backends.
EDIT2: 60FPS patch was responsible for the remaining issue of missing sound effects
EDIT3: Reported patch issue here but it turns out to be the classic unclean shutdown issue, despite me remembering I tested for that - https://github.com/shadps4-emu/ps4_cheats/issues/21
@rharish101 commented on GitHub (Dec 26, 2024):
Nope, I'm facing this issue, and I'm running AMD CPU (7800X3D) and AMD GPU (7900 XTX). I tested this both on X11 (Xfce) and Wayland (Hyprland, after the
unset DISPLAYtrick), and both use Pipewire. Are there any audio logs I could collect and provide?@Bettehem commented on GitHub (Dec 26, 2024):
I am experiencing the same missing character sounds issue as @C0rn3j but for me seems to happen only on my AMD GPU when using the 60fps patch and Log Type set to async. If Log Type is set to sync, audio works even with the 60fps patch.
On my NVIDIA GPU, audio works properly when using the 60fps patch even with Log Type set to async.
If the 60fps patch is disabled, there seem to be no audio issues regardless of the Log Type or GPU.
System specs:
CPU: AMD Ryzen 7 1800X
GPU0: AMD Radeon RX Vega 64
GPU1: NVIDIA GeForce GTX 1080
RAM: Kingston HyperX Fury 32GB
OS: Arch Linux
EDIT: Seems like the audio breaks if the game is not exited cleanly as reported here. If audio is broken, in the game go to the main menu, then restart the emulator and audio works on every configuration i have tried, with or without patches
@ShaunaTheDead86 commented on GitHub (Dec 27, 2024):
I was just testing the fix provided @squidbus when I saw that the commit was merged around the time of this post. There isn't a new build in the release folder yet, but the fix is coming soon. If you don't want to wait for a new release then follow the build instructions.
I can confirm that the build fixes all sound issues for me. For the record, I'm running an Arch based distro called Garuda Linux on Wayland with audio support installed for ALSA, PipeWire, and JACK.
@Hermiten commented on GitHub (Dec 27, 2024):
Ok nice, can anyone else who has already reported the problem test again on the last main?
This: https://github.com/shadps4-emu/shadPS4/pull/1895 can maybe fix the problem
@C0rn3j commented on GitHub (Dec 27, 2024):
Glitched on cubeb too.
@squidbus commented on GitHub (Dec 27, 2024):
Distorted audio right? Not the issue with missing sounds.
@C0rn3j commented on GitHub (Dec 27, 2024):
Yep yep, the ear murdering banshee screams
@bucior3 commented on GitHub (Dec 28, 2024):
For me it works on latest git on archlinux, before #1895 i had to set "SDL_AUDIO_DRIVER=pulseaudio shadps4" or i heard banshee screams
@Hermiten commented on GitHub (Dec 28, 2024):
What about you @ycb678 ?
@C0rn3j commented on GitHub (Dec 28, 2024):
I'd like to point out is that SDL3 is problematic for PW (but not pulse) even for Valve games, where people (including me, without the quantum changes) lose sound completely until disabling and reenabling the sound device in pwvucontrol/pavucontrol in CS2 and Dota 2, which both use SDL3.
https://github.com/ValveSoftware/csgo-osx-linux/issues/3832
Can I actually somehow simply force this package to completely rely on Qt instead of SDL, since I see that the CI has separate SDL and Qt builds?
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=shadps4-git
I've actually had my sound issue completely come back when I was testing couple days ago even on default PW config after killing whatever background apps I had turned on at the time, which were apparently managing to not cause it. (which is identical behavior to Tauon's PW buffer bug, where chromium YT window + iirc enabled mic made it stop glitching).
@FelSiq commented on GitHub (Dec 28, 2024):
I'm facing distorted audio issues on the latest release, too (I tried both w/ audio backend = cubeb and SDL).
NOTE: I'm inclined to say that some recent updates, possibly after enabling the cubed backend, has improved a little bit the audio distortion issue, but definitely hasn't solved it. It almost sounds like sound effects are played multiple times at once.
My system specs:
UPDATE: the missing sound effects glitch triggers for me when the game session isn't properly finished. However, by loading a character and exiting the game properly fixes it for the next time.
The audio distortion still persists, thought. It is very perceptible while walking in the water, for example. It still sounds to me that it is caused by some sound effects being played multiple times and overlapping.
@ShaunaTheDead86 commented on GitHub (Dec 29, 2024):
Earlier I said that switching to cubeb fixed my audio issues, and it did fix the banshee scream sound but after playing Bloodborne awhile I noticed that there were many sounds that weren't playing at all.
After experimenting more, what others have suggested here works better for me.
SDL_AUDIO_DRIVER=pulseorSDL_AUDIODRIVER=pulseenvironment variable seems to fix the sound issues.I wonder if it has to do with the order SDL tries audio backends which goes
openbsd, dsp, alsa, then pulse. The issue with SDL probably lies with openbsd, dsp, or alsa then.@squidbus commented on GitHub (Dec 29, 2024):
Did you try cubeb again after? There's a known issue where some sounds don't work properly sometimes in that game, mainly if you're using the 60FPS patch or when you get the notice that it was not closed properly on start.
@VasylBaran commented on GitHub (Dec 29, 2024):
I'm experiencing the same issue on both the latest release (v0.5.0) and latest nightly build ("Pre-release-shadPS4-2024-12-29-ac2e8c2") with both Audio backends. I'm on Arch Linux (Wayland). The problem is reproducible with multiple games not just a single game. Other applications/emulators work fine. My systemwide audio backend is pipewire.
@VasylBaran commented on GitHub (Dec 30, 2024):
Seems to be related to QUANT, RATE and WAIT values determined by shadPS4 for the audio_backend/pipewire.
In these examples when QUANT equals 256 audio is ok, when it's 1024 all I hear is a loud buzz.
I tested this on 3 different machines, two Arch Linux and one M1 Mac. One Arch Linux machine has a properly working audio (256 value), on another Arch Linux machine shadPS4 is broken (1024 value) and all I hear is a loud buzzing sound even though the output audio device is the same as before. On a 3rd machine (M1 Mac) audio is also broken (loud buzzing sound). This "randomness" complicates things...
@squidbus commented on GitHub (Dec 30, 2024):
It's related to the amount of time
sceAudioOutOutputtakes and how games react to that.@FelSiq commented on GitHub (Dec 31, 2024):
Tested again on most recent patch (nightly): audio with SDL backend is extremely distorted but using cubeb backend sounds far better to me.
@C0rn3j commented on GitHub (Dec 31, 2024):
Most recent version that is supposed to fix this issue lacks the cubeb backend, are you comparing against an older version with cubeb or possibly used the wrong version for testing (the dev releases are called pre-releases not nightly?)?
EDIT:
Can't compile so can't test - #1994
@FelSiq commented on GitHub (Dec 31, 2024):
Comparing to a previous version, yes.
When I checked the SDL update, the cubeb option wasn't available anymore, so I believe it was the correct version.
Has the patched version solved the issue for you?
NOTE: the post-patch version spams the following warning to me:
@VasylBaran commented on GitHub (Dec 31, 2024):
@FelSiq please take in account that it depends on the game. For example Bloodborne and Darkwood used to be have broken sound in the older build for me but the new build fixed it. However in The Binding of Isaac: Rebirth the sound is still distorted (so even in the newest build of shadPS4)
@C0rn3j commented on GitHub (Jan 1, 2025):
@squidbus thanks a ton for your work, what an awesome present for New Year's!
I can't reproduce the OG sound glitches anymore.
I can't reproduce the patch sounds-be-gone anymore.I can but so far only on a failed exit load, before it randomly triggered without it too.I also happen to not freeze anymore on fighting the initial enemy with the patches enabled.Still do, but it's just that specific one enemy...The only things I've done is switched to clang to avoid the recently introduced gcc build failure and updated shad.
Sound is mildly cut-offy and I do have the queue overflow issue too, but this is SO MUCH BETTER.
I hope this isn't just me having a couple lucky launches - once again - thank you, and thanks to everyone else who works on this project!
@VasylBaran commented on GitHub (Jan 1, 2025):
I second this, thank you @squidbus for all your work. Happy New Year! 🥳
@Hermiten commented on GitHub (Jan 1, 2025):
Can I close this one ?
If there is still some problem but different from this issue, maybe open a new issue with a good description of what happens, etc...
@C0rn3j commented on GitHub (Jan 1, 2025):
It looks like the only person in here who had a better experience on the short-lived cubeb backend was @FelSiq - does the audio sound anything like https://github.com/shadps4-emu/shadPS4/issues/1717#issuecomment-2527864210 for you, or does it sound like a different issue?
@FelSiq commented on GitHub (Jan 2, 2025):
@C0rn3j definitely different - in this video it is much more extreme of an issue.
If the audio has improved in general and we can agree that it varies across games, I believe it is fair to close this issue since the original problem appears to be solved and take a look into possibly other audio issues in future ones.
Thank you all for sharing your experience here.
@C0rn3j commented on GitHub (Jan 2, 2025):
Then I suppose this can be closed and a new issue should be created about your issues + the overflows (if it isn't even the same one, which it really looks like it may be)
EDIT: I've created #2015 to track the new issue
@Valrravn commented on GitHub (Jan 14, 2025):
I have the same issue, but instead of audio cut off my game freezes dead altogether. Clicking a window causes Windows to throw "not responding: close or wait" warning. I choose to wait and it unfreezes eventually. The console is spammed with the yellow "SDL backed up X in queue" warnings while it hangs. In Event Viewer, the following message appears:
"Fault bucket , type 0
Event Name: AppHangTransient
Response: Not available
Cab Id: 0
Problem signature:
P1: shadPS4.exe
P2: 0.0.0.0
P3: 677f70b4
P4: unknown
P5: unknown
P6: unknown
P7: unknown
P8:
P9:
P10:
Attached files:
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.b09d219c-ed5c-461f-9ba7-37c6ac4b0823.tmp.WERInternalMetadata.xml
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.ae459302-5327-4679-9f57-1a5a799ae4a9.tmp.csv
\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER.0bd8015b-ea06-41ab-8744-a0a252599779.tmp.txt
These files may be available here:
NULL
Analysis symbol:
Rechecking for solution: 0
Report Id: 061051f9-62df-4c81-b587-d7605a18e86f
Report Status: 2049
Hashed bucket:
Cab Guid: 0"
Funnily enough, this happens when I attempt to play on regular output devices (main monitor + external Creative sound card). When I launch it on my TV, it runs smoothly and this issue never occurs.