Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Audio delay on retropie  (Read 6735 times)

0 Members and 1 Guest are viewing this topic.

Marcoqwerty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:March 14, 2024, 02:46:08 pm
Audio delay on retropie
« on: April 25, 2018, 05:14:48 pm »
Enyone have some issue with audio on Retropie?

I hear the sound (ingame and during the videosnap) after few second.

Actually i get out the sound by the JACK AUDIO  :banghead:

nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1746
  • Last login:March 06, 2024, 07:26:06 am
  • I want to build my own arcade controls!
Re: Audio delay on retropie
« Reply #1 on: April 27, 2018, 02:12:13 pm »
which PI?
Which distribution?
Which emulator?
Are you doing anything with filters or shaders?
Are you over clocking?
If Over Clocking are you using heat sinks?

did you set the RCA output specifically in the config.txt file?

Marcoqwerty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:March 14, 2024, 02:46:08 pm
Re: Audio delay on retropie
« Reply #2 on: May 04, 2018, 03:54:06 am »
which PI?
Raspberry PI 3

Quote
Which distribution?

Floobs attract mode + retropie RAW IMAGE

http://smartretro.co.uk/forums/viewtopic.php?f=3&t=8277

Quote
Which emulator?

Advmame 1.4 (MAME 106)

Quote
Are you doing anything with filters or shaders?

Nothing

Quote
Are you over clocking?

No

Quote
did you set the RCA output specifically in the config.txt file?

This is ma actual config.txt

Code: [Select]
# For more options and information see
# http://rpf.io/configtxtreadme
# Some settings may impact device functionality. See link above for details

disable_splash=1

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=1
hdmi_mode=16

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes ....      se lo abilito non sento più l'audio dal JACK AUDIO
# hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
overscan_scale=1

# position screen based on display_rotate=0 for horizontal
# display_rotate=1 for vertical, top to right (90)
# display_rotate=2 for horizontal, flip (180)
# display=3 or vertical, top to left (270)
display_rotate=1

# Pretends all audio formats are supported by display, allowing passthrough of DTS/AC even when not reported as supported.
#hdmi_force_edid_audio=1

# To remove hiss or static or white noise when using the 3.5mm headphone jack
disable_audio_dither=1
#audio_pwm_mode=2

The other modification is on my ~/RetroPie-Setup/retropie_setup.sh  (setup the Audio Config to AUTO but i also try the others)


nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1746
  • Last login:March 06, 2024, 07:26:06 am
  • I want to build my own arcade controls!
Re: Audio delay on retropie
« Reply #3 on: May 12, 2018, 10:25:23 am »
I see one potential issue right away.
You have the display rotated.
That has shown to introduce lag due to the PI needing more memory and resources to rotate the whole display.
You should be rotating the emulator and using a vertical theme for the front end.

you will see things run smoother.

Alternatively you can:
up GPU memory to 500mb the config file auto sets it to 256 because pi3 has 1gb of ram.
you shouldn't run into system memory issues at that setting since the image is made to run lean.

check the audio settings in the advmame.rc.
you can try setting sound sampling to 22050
and set:  debug_rawsound yes

Go with a 37b varient of mame.
libretro 2000 i think or mame4pi to lessen the load.

there are not a ton of vertical games so the older romsets should be able to cover most of them.

Marcoqwerty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:March 14, 2024, 02:46:08 pm
Re: Audio delay on retropie
« Reply #4 on: May 12, 2018, 02:25:04 pm »
Thank you the helpful tips...i followed another way, the complete reinstallation of retropie.

Started from the original clean iso, i istalled step by step all, script included...and now all is working perfectly.

I do not know what was the cause of the ingame audio delay, but i discover the videosnap audio delay issue (maybe the ingame delay was a consequence of this dealay  :dizzy: )

For the videosnap i used the .MP4 video (low quality) but it required a lot of CPU usage, i must change into to the .AVI ( i donloaded new one); now the videosnap plays correctly perfect in sincro with the video.

But now i will try to improve more the Retropie experience to the helps of your tips!  :notworthy:

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4222
  • Last login:December 17, 2023, 08:05:48 am
  • I have a gaming addiction.....
Re: Audio delay on retropie
« Reply #5 on: May 12, 2018, 03:15:43 pm »
For future ref this can also be caused by the TV sound settings on modern TV’s.

Can usually be cured by setting the general settings to “video game”.

Marcoqwerty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:March 14, 2024, 02:46:08 pm
Re: Audio delay on retropie
« Reply #6 on: May 12, 2018, 06:47:17 pm »
For future ref this can also be caused by the TV sound settings on modern TV’s.

Can usually be cured by setting the general settings to “video game”.

Mine was a TFT screen...the same screens of the surveillance system, didnt has this feature.

nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1746
  • Last login:March 06, 2024, 07:26:06 am
  • I want to build my own arcade controls!
Re: Audio delay on retropie
« Reply #7 on: May 14, 2018, 10:22:32 am »
Glad you got it working.

Marcoqwerty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:March 14, 2024, 02:46:08 pm
Re: Audio delay on retropie
« Reply #8 on: June 16, 2018, 04:30:16 pm »
Im soo sorry to reup this old topic...but it is umbelivable, after a fresh new install i jump again in the same nightmare

LAG AUDIO always during the game specially ADVMAME.

Actually im restalling from a source all ADVMAME but i think the issue come from the master audio driver, there was some way to reset it?

Another probabily issue would be the playing with a script who change the output of the audio (depends of the rotation i switch from jack or HDMI, yes i have tried to disable them but without helps)

i've found this:

Quote
Turns out my lack of audio was because I'd run sudo amixer cset numid=3 1 previously to try to get sound working on FUSE (which turned out to be broken because of PulseAudio!) and forgot to change it back.

A possible solution but i didnt understand what this guy are saying.... :hissy:  :banghead:

Any helps to restore the initial condition of retropie or reset all the stuff would be appreciated!

nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1746
  • Last login:March 06, 2024, 07:26:06 am
  • I want to build my own arcade controls!
Re: Audio delay on retropie
« Reply #9 on: June 23, 2018, 10:43:40 am »
Every time you flash a card you have issues.
Either your card is bad or your flashing software isn't behaving.
Find a new way to write the card first.
Then try a new card.
Also re-download the image.

you shouldn't have these issues so sporadically.

JDFan

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3448
  • Last login:May 21, 2023, 04:07:42 pm
  • I want to build my own arcade controls!
Re: Audio delay on retropie
« Reply #10 on: June 23, 2018, 12:32:43 pm »
Every time you flash a card you have issues.
Either your card is bad or your flashing software isn't behaving.
Find a new way to write the card first.
Then try a new card.
Also re-download the image.

you shouldn't have these issues so sporadically.

In addition to this -- What Power supply are you using and do you ever see the lightning bolt on screen --- the rpi will go into a safe mode if the power supply is not supplying enough voltage which will down clock the CPU which in turn will cause problems with the audio since the CPU is running to slow to process it in sync with the video. so if using a low quality power supply you might try a differnt supply and see if the problem clears up.

Marcoqwerty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 123
  • Last login:March 14, 2024, 02:46:08 pm
Re: Audio delay on retropie
« Reply #11 on: June 26, 2018, 05:22:30 pm »
Thank you to all replyes....
i think my issue its coming from a dedicated script who check the coot config.txt and modify the audio setting in according to the rotation setup.

I'm investigating.

Now after turning off this script i have no delay during the game.