RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.34k stars 1.91k forks source link

[Regression] Audio crackling on Linux when audio buffering is enabled (#11358) #13310

Closed Evilhotdog closed 1 week ago

Evilhotdog commented 1 year ago

Quick summary

When booting up any program I tried, there is consistent audio crackling

Details

Audio crackling appears both on PS3 system software and Persona 5. It's a lot more noticeable on the system software startup screen

Switching to Faudio from cubeb did not work, nor did disabling audio buffering or enabling time stretching. Enabling SPU loop detection or limiting the preferred SPU threads, as I've seen recommended, did not work.

Attach a log file

RPCS3.log

Attach capture files for visual issues

No response

System configuration

Arch Linux

CPU: AMD Ryzen 5 3600X GPU: AMD Radeon RX 5600 Mesa version: 22.3.3-3 Kernel: 6.1.8 Audio system: Pipewire 0.3.64 (also non functional on Pulseaudio)

Other details

No response

Nekotekina commented 1 year ago

Is it system default to use PipeWire? Can you try Pulse instead?

Evilhotdog commented 1 year ago

System default is no audio. Tried with Pulseaudio and there was no change.

Triticum0 commented 1 year ago

I had the same issue on Manjaro, not sure if Anileo had the same issue as they have a manjaro test system. Note I was using an app image not sure if that has anything to do with it.

Evilhotdog commented 1 year ago

I'm using the Flatpak. I'd also had a similar issue on the AUR package in the past I think

AniLeo commented 1 year ago

The flatpak is not maintained by us. Try the AppImage.

Evilhotdog commented 1 year ago

I'll try that out when I get home

kd-11 commented 1 year ago

Fixed by enabling timestretch, but that indicates to me that we have a timing issue.

Evilhotdog commented 1 year ago

Huh. That didn't do it for me when I tried

paperbenni commented 1 year ago

Fixed by enabling timestretch, but that indicates to me that we have a timing issue.

timestretch fixed it for me, using pipewire and the AUR package

Evilhotdog commented 1 year ago

Okay, sorry for slow reply. I thought I had already replied to this.

Switching to the AppImage solved crackling on the PS3 system software, but it is still noticeable on Persona 5.

This time, it is fixed by timestretch

Evilhotdog commented 1 year ago

I just realised, if there's a timing issue, this should probably remain open

AniLeo commented 1 year ago

This should be a regression caused by "Audio Buffering" being enabled, if you disable it does it work fine even without the workaround you mentioned with time stretching?

Yahfz commented 1 year ago

Regressed by #11358

MastaG commented 1 year ago

Same problem for me on Fedora 38 (todays git) Not to be offtopic, but most Linux-related issues have been fixed for me now. With a fresh build and removing ~/.config/rpcs3 and ~/.cache/rpcs3, I can now succesfully start and close rpcs3 without segfaulting :) Also the vsh now compiles and runs without issues.

The one problem remaining seems to be the audio crackling and audio cutting out randomly. Like when playing Dante's Inferno for example:

Megamouse commented 11 months ago

Please try again

MastaG commented 11 months ago

Hi @Megamouse I see the official AppImage is now built with clang, thanks for this. It should make a lot of Linux users happy :+1: This was also the workaround for me to fix the audio issues, I just forgot to report it here. So technically the audio issue is still present, but it only occurs when compiling rpcs3 using GCC.

MSuih commented 11 months ago

It might be resolved by updating GCC to 13.2. We decided to switch compiler for CI as that GCC version is complicated to acquire for Ubuntu LTS.

RipleyTom commented 11 months ago

Reopening as the issue is unrelated to gcc/clang.

NerosTie commented 11 months ago

(the missing audio in Demon's Souls (for example the first screen when you press the "OK" button and the sound effect in the main menu when the title appears) is fixed with the last appimage, I noticed)

SheMelody commented 6 months ago

I confirm the issue, I can reproduce this on fully updated Arch Linux using pipewire-audio / pipewire-pulse with both cubeb and faudio. Crackling happens when buffering is enabled, while audio skips if buffering is disabled. Was perfectly fine the last time I tried RPCS3, which was around 2 years ago.

Edit: Seems like only music is affected by audio skipping when buffering is disabled.

esanscoopsers commented 2 months ago

what was the last build of rpcs3 that didn't have this issue? I just want it for demon's souls.