Menu

#266 Advmenu 3.9 Choppy sound returning from screensaver.

other
open
5
2018-10-19
2018-09-23
No

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.

1 Attachments

Discussion

  • Michael.S.G.

    Michael.S.G. - 2018-09-24

    Disregard this comment,

    This has been noticed for the last few versions of Advance Menu.
    Further investigation as to which version the problem began may be needed.

    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
  • Michael.S.G.

    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
  • Michael.S.G.

    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

    5.2.1 device_sdl_samples
    Select the size of the audio fragment of the SDL library.

    The use of this option is discouraged, it's present only for testing.

    device_sdl_samples 512 | 1024 | 2048 | 2560 | 3072 | 3584 | 4096 | 6144 | 8192

    Options:
    SAMPLES Number of samples of an audio fragment (default 2048 in Windows, 512 otherwise).

    Lower values can be used to reduce the sound latency. Increase the value if your hear a choppy audio.

     
  • Michael.S.G.

    Michael.S.G. - 2018-09-25

    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
  • Andrea Mazzoleni

    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

     
    • Michael.S.G.

      Michael.S.G. - 2018-09-25

      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
  • Michael.S.G.

    Michael.S.G. - 2018-09-25

    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.

    Test Sheet SDL
    device_sound sdl
    device_sdl_samples 2048
    sound_buffer 1.0
    sound_latency 0.1
    sound_samplerate 44100
    AdvMenu Log Enabled

    Test #1 (24hr – 1 Day)
    Day dd/mm/yy hh:mm am|pm
    Start: Tuesday 25/09/18 11:00 am
    Check: Wednsday 26/09/18 11:00 am
    Result: Sound ok

    Test #2 (48hr – 2 Day)
    Day dd/mm/yy hh:mm am|pm
    Start: Wednsday 26/09/18 12:00 pm
    Check: Friday 28/09/18 12:00 pm
    Result: Sound ok

    Test #3 (72hr – 3 Day)
    Day dd/mm/yy hh:mm am|pm
    Start: Wednsday 26/09/18 12:30 pm
    Check: Saturday 29/09/18 12:30 pm
    Result: Slightly choppy

    Test #4 (96hr – 4 Day) (Continued Test #3)
    Day dd/mm/yy hh:mm am|pm
    Start: Wednsday 26/09/18 12:30 pm
    Check: Sunday 30/09/18 12:30 pm
    Result: Notably choppy

     

    Last edit: Michael.S.G. 2018-10-19
  • Michael.S.G.

    Michael.S.G. - 2018-09-30

    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
  • Michael.S.G.

    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

Log in to post a comment.