lr-PUAE Pi400 CD Audio jumps/mute in 50Hz
-
Merged
-
@mitu
I just dug out my old Pi 3 (not plus), installed the latest image.This needs updating in the es_systems.cfg -
Add .chd to the supported extensions.I notice that the default Retroarch Audio driver on the Pi 3 is 'Alsathread'.
On the Pi 400 it's just 'Alsa'. This makes the CD Audio jump/mute. Why has the Pi400 been set differently ?
-
@maxbeanz said in lr-PUAE Pi400 CD Audio jumps/mute in 50Hz:
On the Pi 400 it's just 'Alsa'. This makes the CD Audio jump/mute. Why has the Pi400 been set differently ?
I don't think it's ALSA - my guess is that the resolution change doesn't actually switch to a 50hz mode or the core tries to change the resolution to something else and the audio/video sync is broken, hence the audio jumps:
[INFO] [Video]: Average monitor Hz: 49.992501 Hz. (4.532 % frame time deviation, based on 2048 last samples).
Your verbose log is truncated, so I can't say which resolution is set up in RetroArch - can you re-upload the full log ?
-
@mitu How do I do a full log ? I selected '0 Debug' in Retroarch.
And the thing is, if I change the audio driver to 'alsathread' (which is how it's set by default on the Pi 3) or 'sdl2' then it doesn't jump/mute randomly but still doesn't sound quite right.
Are you thinking this could be related to the audio skewing option ?
-
@maxbeanz said in lr-PUAE Pi400 CD Audio jumps/mute in 50Hz:
How do I do a full log ? I selected '0 Debug' in Retroarch.
See https://retropie.org.uk/docs/Runcommand/#launch-with-verbose-logging
-
@mitu Here it is -
https://pastebin.com/WbCPkxdm -
@mitu No ideas then ?
-
I haven't got to test the game on a 50hz display, just ran it normally (at @60hz) and the music seems fine to me - the intro plays without any skips or stutters. Did you try doing the same - just run the game without any special resolution set-up ?
-
@mitu Yeah, as I said in my first post, it doesn't happen at 60Hz. (And also doesn't happen if you set the audio driver to anything but 'alsa').
-
I managed to reproduce the issue on a 50hz resolution and it's strange that it only happens with
alsa
. Switching toalsathread
as audio driver (you can do that from the configuration editor) fixes this.
I don't know well enough how RetroArch configured both drivers and which parameters affect how they're configured, it looks like the threaded ALSA driver has a shorter buffer and may synchronize the audio better (?):-
with alsathread
[INFO] ALSA: Using signed 16-bit format.
[INFO] ALSA: Period size: 480 frames
[INFO] ALSA: Buffer size: 1536 frames -
with alsa
[INFO] [ALSA]: Using signed 16-bit format.
[INFO] [ALSA]: Period size: 768 frames
[INFO] [ALSA]: Buffer size: 3072 frames
-
-
@mitu Thanks for confirming, now we know that it's a problem with Raspberry Pi. As I said, it's weird how a clean install on a Pi 3 sets it as 'alsathread' but the Pi 4/400 sets it as 'alsa' ('sdl2' also works better than 'alsa'). The CD audio still doesn't sound clean in 'alsathread' (like it does at 60Hz). Have you also noticed that the audio quickly mutes whenever the core changes the resolution ? This seems to only happen on the RPi too (can be quite annoying when watching demos that switch res a lot).
I tried Android at 50Hz and it sounds fine, (Android uses 'opensl').
I take it this is a problem that will never be fixed ? Is it RetroPie or Raspian ?
-
@maxbeanz said in lr-PUAE Pi400 CD Audio jumps/mute in 50Hz:
Have you also noticed that the audio quickly mutes whenever the core changes the resolution ?
Yes, but I expect this to happen with emulation, since probably the emulator needs to re-calibrate and re-sync the audio to the video.
it's weird how a clean install on a Pi 3 sets it as 'alsathread'
Not sure which version of RetroPie you're installing, but
alsathread
is not explicitly set as default anywhere in the latest version, regardless of Pi version. Could be that RetroArch chooses it as best at runtime.I take it this is a problem that will never be fixed ? Is it RetroPie or Raspian ?
Given that I don't know why the issue occurs, I can't say.
-
@mitu said in lr-PUAE Pi400 CD Audio jumps/mute in 50Hz:
@maxbeanz said in lr-PUAE Pi400 CD Audio jumps/mute in 50Hz:
Have you also noticed that the audio quickly mutes whenever the core changes the resolution ?
Yes, but I expect this to happen with emulation, since probably the emulator needs to re-calibrate and re-sync the audio to the video.
It only seems to happen on Raspberry Pi, i've tried Android and PC and they don't do it. The Android device I tried was a Firestick 4K which is a lot slower than a Pi 400.
it's weird how a clean install on a Pi 3 sets it as 'alsathread'
Not sure which version of RetroPie you're installing, but
alsathread
is not explicitly set as default anywhere in the latest version, regardless of Pi version. Could be that RetroArch chooses it as best at runtime.I installed a clean version to my old Pi 3 from the Retropie Downloads section. The first thing I did was look at the audio section in Retroarch, it said 'alsathread'.
So to sum up, this whole thread was a pointless report and looks like we're stuck with it !
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.