Affects P5 but also drakengard 3 and project diva.
Can be temporarily fixed by unplugging my speakers and plugging them back in, after a period of intense crackling it goes away for a short time (a few minutes at least.)
probably partly pulse's fault but only rpcs3 is having this issue for me.
I got around this by switching to OpanAL, of all things.
Pulseaudio option does not appear in my case. Just ALSA and OpenAL. Switching to OpenAL causes slowdown and makes crackling worse
@petran79 puleaudio using alsa as its backend
Does starting RPCS3 in terminal with PULSE_LATENCY_MSEC=30 change anything?
:~$ PULSE_LATENCY_MSEC=30 '/home/YourHomeNameHere/rpcs3/bin/rpcs3'
@greentop since I followed https://wiki.archlinux.org/index.php/Professional_audio and setup Pulse->ALSA->Jack for audio and got my reported audio latency down to ~5ms its far less prominent.
Setting the pulse latency like that makes it more pronounced, but right now its still not as bad as before (without changing kernel parameters and such to verify.)
What audiocard do you use? I have horrible cracking on my usb headset, but there are little to none problems if main output is built-in card.
Pulse log, built-in card:
( 224.411| 2.015) D: [alsa-sink-ALC887-VD Analog] memblock.c: Pool full
( 224.411| 0.000) D: [alsa-sink-ALC887-VD Analog] memblock.c: Pool full
( 224.506| 0.095) D: [alsa-sink-ALC887-VD Analog] memblock.c: Pool full
( 225.113| 0.606) D: [alsa-source-USB Audio] memblock.c: Pool full
( 225.131| 0.017) D: [alsa-sink-ALC887-VD Analog] memblock.c: Pool full
( 225.173| 0.042) D: [alsa-sink-ALC887-VD Analog] memblock.c: Pool full
( 225.273| 0.100) D: [alsa-source-USB Audio] memblock.c: Pool full
( 225.274| 0.001) D: [alsa-sink-ALC887-VD Analog] memblock.c: Pool full
( 225.333| 0.058) D: [alsa-sink-ALC887-VD Analog] memblock.c: Pool full
( 225.456| 0.123) D: [alsa-sink-ALC887-VD Analog] memblock.c: Pool full
( 225.462| 0.005) D: [pulseaudio] memblock.c: Pool full
( 231.451| 5.989) D: [alsa-sink-ALC887-VD Analog] ratelimit.c: 33 events suppressed
( 231.451| 0.000) D: [alsa-sink-ALC887-VD Analog] memblock.c: Pool full
( 231.458| 0.007) D: [alsa-source-USB Audio] memblock.c: Pool full
( 231.461| 0.003) D: [pulseaudio] memblock.c: Pool full
( 231.701| 0.239) D: [alsa-sink-ALC887-VD Analog] memblock.c: Pool full
Pulse log, Plantronics GameCom 780 usb headset, a lot of cracking:
( 14.836| 0.000) D: [alsa-sink-USB Audio] source.c: Processing rewind...
( 14.836| 0.000) D: [alsa-sink-USB Audio] protocol-native.c: Implicit underrun of 'ALSA Playback'
( 14.836| 0.000) D: [alsa-sink-USB Audio] sink.c: alsa_output.usb-Plantronics_Plantronics_GameCom_780-00.analog-stereo: Found underrun 160 bytes ago (1280 bytes ahead in playback buffer)
( 14.836| 0.000) D: [alsa-sink-USB Audio] sink.c: alsa_output.usb-Plantronics_Plantronics_GameCom_780-00.analog-stereo: Found underrun 160 bytes ago (1280 bytes ahead in playback buffer)
( 14.836| 0.000) D: [alsa-sink-USB Audio] sink.c: alsa_output.usb-Plantronics_Plantronics_GameCom_780-00.analog-stereo: Found underrun 160 bytes ago (1280 bytes ahead in playback buffer)
( 14.836| 0.000) D: [alsa-sink-USB Audio] sink.c: alsa_output.usb-Plantronics_Plantronics_GameCom_780-00.analog-stereo: Found underrun 160 bytes ago (1280 bytes ahead in playback buffer)
( 14.836| 0.000) D: [alsa-sink-USB Audio] sink.c: alsa_output.usb-Plantronics_Plantronics_GameCom_780-00.analog-stereo: Found underrun 160 bytes ago (1280 bytes ahead in playback buffer)
( 14.840| 0.003) D: [alsa-sink-USB Audio] sink.c: alsa_output.usb-Plantronics_Plantronics_GameCom_780-00.analog-stereo: Found underrun 1312 bytes ago (128 bytes ahead in playback buffer)
( 14.840| 0.000) D: [alsa-sink-USB Audio] sink.c: alsa_output.usb-Plantronics_Plantronics_GameCom_780-00.analog-stereo: Found underrun 1312 bytes ago (128 bytes ahead in playback buffer)
( 14.841| 0.000) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.usb-Plantronics_Plantronics_GameCom_780-00.analog-stereo becomes idle, timeout in 5 seconds.
( 14.841| 0.000) D: [alsa-sink-USB Audio] sink.c: alsa_output.usb-Plantronics_Plantronics_GameCom_780-00.analog-stereo: Found underrun 1312 bytes ago (128 bytes ahead in playback buffer)
( 14.841| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: hwbuf_unused=0
( 14.841| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: setting avail_min=88009
( 14.841| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: Requested to rewind 352800 bytes.
( 14.841| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: Limited to 1184 bytes.
( 14.841| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: before: 296
( 14.841| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: after: 296
( 14.841| 0.000) D: [alsa-sink-USB Audio] alsa-sink.c: Rewound 1184 bytes.
( 14.841| 0.000) D: [alsa-sink-USB Audio] sink.c: Processing rewind...
( 14.841| 0.000) D: [alsa-sink-USB Audio] source.c: Processing rewind...
im just using the internal intel one. when i used my usb DAC it was also extremely bad.
Also have this issue with my HyperX cloud 2 headset and speakers plugged into the case's audio jack.
@greentop After launching RPCS3 with that variable the issue is almost gone for me.
Whether game will crackle or not is seemingly determined on boot. If there's zero crackling on boot it's going to be fine. If there's a lot of it, there's going to be a lot of it till I kill the game.
Still present in v0.0.3-43b860d-7866_linux64.AppImage [2017-08-29] even with Pulse option.
I think the crackling only happens during slowdowns for me when I use the PulseAudio option.
Same problem here. Very boring.
I would try ALSA with different values for Buffer Count setting in config.yml, however, I doubt it helps. About 5 ms latency seems pretty much expected.
I have tried many values for buffer count, no difference.
I also tried a lot of different Pulseaudio configurations, without success even if it is sometimes slightly better. Note that it doesn't make on all games (On Nier for example it's catastrophic) and that it doesn't depend on the speed of the game (fullspeed or not) even if it's worse when you slow down.
Please note that I have no problems except on RPCS3.
Why not think about using Portaudio with SDL instead?
Pause emulation for 5 seconds then resume. Pulseaudio gets magically fixed like that. Its something to do with sync imo.
I did some tests that I recorded to show you the problem. I did the test on Nier. To avoid any problem with the slowdowns of the game I went to the menu where I am fullspeed 60 FPS.
Nier with Pulseaudio:
https://clyp.it/fpkeswk0
Nier with Pulseaudio Pause/Resume 10 seconds:
https://clyp.it/3c2x0xcc
Not really of difference for me, maybe slightly better...
I can't manage to record Alsa and OpenAL directly for the moment but know that on Alsa it's the same as Pulseaudio and OpenAL is much worse. I have tried every possible combination of Pulseaudio and RPCS3 configuration, no noticeable difference.
On Windows I don't have this problem and on Linux it only does it on RPCS3.
I've done a lot of testing again, try all possible and imaginable combinations of configuration and the problem persists. For example on Naruto where I am fullspeed all the time the sound is catastrophic whether it is Alsa, Pulseaudio or OpenAL.
I don't get much feedback from people on Linux and when I ask for some tests I never get anything... so it's hard to know the cause but for me it's clearly a buffer/latency problem.
Apart from RPCS3 the sound works perfectly everywhere else including other emulators such as: Dolphin, PPSSPP, PCSX2, Retroarch, native linux, browser, video, etc....
Problem is visible on this video for example: https://www.youtube.com/watch?v=WC0ESMa-Ips
I recorded the sound on Naruto: https://clyp.it/n20p4oel
Logo intro + cinematic + main menu.
I also thought that the integration of another audio backend would be good for you, for example Dolphin has integrated the Cubeb backend which allows you to have a low latency and be multiplatform. I think it would be very beneficial for sound on RPCS3.
https://github.com/kinetiknz/cubeb

Screenshot taken by Dolphin devs who seem to be very satisfied with it. Of course, there is still the possibility of using PortAudio, which would be much more flexible and customizable as well.
There are many possibilities to significantly improve the sound on RPCS3 in any case, I don't think that a "simple" ALSA and Pulseaudio will suffice.
This may be unrelated, but may be worth trying to disable speedstep (put all CPU cores to their nominal frequency) on Linux:
sudo -s
for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do [ -f $CPUFREQ ] || continue; echo -n performance > $CPUFREQ; done
exit
This fixed some problems for me.
I already had the speedstep disabled since my processor is OC. But after a lot of tests and confirmation by Kd I think the general problem is that on Linux the priority of threads is poorly managed or not existing on RPCS3. I guess it's kernel scheduling that takes the lead, so normally audio threads that should be high priority are not.
It works more or less when there are enough threads/core available but when you switch to an i5 with only 4 threads it is problematic on some games.
This also explains some performance improvements obtained on Linux and not on windows.
I'm having the same issue across several games!
OS: Arch Linux x86_64
Host: GB-BNi7HG6-1060 1.x
Kernel: 4.16.3-1-ARCH
Resolution: 1920x1080
CPU: Intel i7-7700HQ (8) @ 3.800GHz
GPU: NVIDIA GeForce GTX 1060 Mobile 3GB
Memory: 2238MiB / 7916MiB
yeah, just got my first game running and have the same issue on ubuntu 18.04 with pulseaudio.
using PULSE_LATENCY_MSEC=30 removes the permanent stuttering of the sound, but every few seconds it still breaks down for like 1 - 2 seconds
yeah, i noticed that when the game goes below 29FPS, which it normally runs on like 29,96, that the audio is basically completely missing, with the PULSE_LATENCY_MSEC=30 environment variable (The game is Drakengard 3 btw)
Does anyone have other programs playing sound in parallel when the problem happens?
the audio options didnt show me any other applications that made sound while i just tested now, so no
For me I'm only using Alsa. Recently I noticed similar issues with other games so it's possible its caused by a recent package update. However Rpcs3 showed the issue weeks before, when the other games were fine.
---- On Wed, 30 May 2018 15:23:54 -0400 [email protected] wrote ----
the audio options didnt show me any other applications that made sound while i just tested now, so no
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
Is this still an issue?
@AniLeo
Just built RPCS3 from git.
ALSA backend gives me no audio output, but it shows up in pavucontrol. Other ALSA programs work.
Pulse has crackling in some games.
OpenAL seems to work best.
@z0z0z Is something in console with ALSA?
Also I'd suggest to try to disable tsched like here: https://askubuntu.com/questions/371595/for-pulseaudio-what-does-tsched-do-and-what-are-the-defaults
@Nekotekina
Sorry I am actually getting ALSA output now. I don't know what that was about.
Edit: I do keep randomly getting no sound when starting games with ALSA. Console spams this
E {cellAudio Thread} cellAudio: Could not enqueue buffer onto audio backend. Attempting to recover... x1422
The number keeps increasing.
What I'm experiencing with pulse in at least Nier, is that it can play fine at first, but eventually slips into light crackling, or severe distortion, and it never resolves.
Here's an example recording of it happening, compared to correct audio with OpenAL (ALSA seems to work fine too).
Pulse corrupted: https://files.catbox.moe/g7ljhl.mp4
Still an issue in current master. If you leave a game running for a while, eventually audio breaks and stays broken if you restart the game or RPCS3.
Used Nier and ALSA for testing, same issue on PulseAudio.
https://streamable.com/652ne2
FAudio doesn't have this issue, and I'd recommend moving to it