rpcs3 icon indicating copy to clipboard operation
rpcs3 copied to clipboard

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

Open Evilhotdog opened this issue 2 years ago • 21 comments

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

Evilhotdog avatar Jan 28 '23 18:01 Evilhotdog

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

Nekotekina avatar Jan 28 '23 19:01 Nekotekina

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

Evilhotdog avatar Jan 29 '23 12:01 Evilhotdog

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.

Triticum0 avatar Jan 29 '23 18:01 Triticum0

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

Evilhotdog avatar Jan 29 '23 19:01 Evilhotdog

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

AniLeo avatar Jan 29 '23 19:01 AniLeo

I'll try that out when I get home

Evilhotdog avatar Jan 30 '23 10:01 Evilhotdog

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

kd-11 avatar Jan 30 '23 11:01 kd-11

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

Evilhotdog avatar Jan 30 '23 12:01 Evilhotdog

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

paperbenni avatar Feb 04 '23 02:02 paperbenni

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 avatar Feb 22 '23 22:02 Evilhotdog

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

Evilhotdog avatar Feb 22 '23 22:02 Evilhotdog

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?

AniLeo avatar Aug 06 '23 20:08 AniLeo

Regressed by #11358

Yahfz avatar Aug 06 '23 21:08 Yahfz

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:

  • The intro videos dont play audio
  • The audio at the title screens is crackling
  • When you wait a minute, it shows you various parts of hell.. without any audio..

MastaG avatar Aug 07 '23 09:08 MastaG

Please try again

Megamouse avatar Nov 08 '23 07:11 Megamouse

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.

MastaG avatar Nov 08 '23 07:11 MastaG

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.

MSuih avatar Nov 08 '23 07:11 MSuih

Reopening as the issue is unrelated to gcc/clang.

RipleyTom avatar Nov 08 '23 12:11 RipleyTom

(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)

NerosTie avatar Nov 08 '23 13:11 NerosTie

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.

SheMelody avatar Apr 17 '24 13:04 SheMelody

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

esanscoopsers avatar Jul 23 '24 05:07 esanscoopsers