Advmenu 3.9 Choppy sound returning from screensaver.
Brought to you by:
amadvance
After allowing Advance Menu to run for a number of days (Screen saver mode active),
Upon returning to the menu (Keypress), The sound is laggy and choppy.
ie. sound_foreground_key is set for audio on menu selection movement.
Making menu navigation unpleasant.
Advance Menu V 3.9 is running on Debian Linux using SDL.
Attached is the in-use advmenu.rc file.
This has been noticed for the last few versions of Advance Menu.
Further investigation as to which version the problem began may be needed.
Disregard this comment,
While this still requires consideration, There have been other OS changes recently.
ie. Previously the target system had Pulse Audio installed, Which is no longer the case.
Just to note at this point:
The audio subsystem installed on the target machine is ALSA.
device_sound is set to sdl in the configuration file.
ie. AdvanceMenu --> SDL --> ALSA
Last edit: Michael.S.G. 2018-09-24
Initial test is to set device_sound to alsa.
ie. AdvanceMenu --> ALSA
However setting this causes audio to fail to work at all.
A separate ticket for device_sound alsa failure is required.
Last edit: Michael.S.G. 2018-09-25
Testing the device_sdl_samples by changing value from 512 to 2048.
Note: When this option is not set, Log indicates size defaults to 512 (Linux).
https://www.advancemame.it/doc-advdev#5.2.1
This is the standard log which I forgot to attach when opening this bug.
ie. It's using device_sdl_samples size of 512.
The log does NOT cover failure event, It was created afterward to provide system & init info.
Last edit: Michael.S.G. 2018-09-25
Hi Michael,
Does the sound work again after starting a game and returning to the menu ?
Try also playing with "-sound_latency N" and "-sound_buffer M" options with different combination. Like with 0.05 and/or 0.2, instead of the default 0.1.
Ciao,
Andrea
Hello Andrea,
Yes the sound corrects itself after starting a game and returning to the menu.
As you can imagine with a problem that takes a few days to appear, Testing is going to be a slow process.
I will also need to make a test to find out more accuratly how long it takes for the problem to appear. eg. 2~3 days or 4~5 days........ I'm not sure, But it is consistant.
Last edit: Michael.S.G. 2018-09-30
The first round of tests increase device_sdl_samples & sound_buffer values.
Tests will be carried out in 24, 48, 72, 96 etc hour blocks until failure no longer occures.
Last edit: Michael.S.G. 2018-10-19
Test results indicate the sound is choppy after 3 days and worse after 4 days.
The sound problem occures regardless of screensaver activity.
The sound corrects itself after starting a game and returning to the menu.
The problem occures consistantly across 3 separate machines.
Two of which I can use as testing machines.
The log after 4 days is 75MB in size.
Attached is the last 2000 lines of the log.
There are quite a few ERROR: sound buffer fifo underflow
I think my last activity in the menu was to move the selector around then selected a game.
(Note I didn't exit the menu cleanly, I just shut the machine down)
Last edit: Michael.S.G. 2018-10-19
Interestingly the sound is choppy when moving the game selection,
But NOT choppy if moving in the menu items.
You can hear the sound correct when entering the game,
Upon exit the sound is ok again when moving the game selection.
So It's like one sound event is getting tied up somehow.
Attached is a quick video showing Game selection & in Menu.
Last edit: Michael.S.G. 2018-10-19