audio latency/delay issue

A forum about the Hatari ST/STE emulator - the current version is v2.0.0

Moderators: simonsunnyboy, thothy, Moderator Team

distantminds
Atari maniac
Atari maniac
Posts: 93
Joined: Thu Sep 29, 2005 5:03 pm

audio latency/delay issue

Postby distantminds » Sun Jul 03, 2016 8:26 pm

Hello again :)

i've been using Hatari to develop my chiptracker. I love it to bits :)

However... something has been bugging me a little. I'm convinced there's a very small audio delay/latency, maybe a couple hundred miliseconds or so.

It's not a problem for everyday demo watching, but when you're trying to play a killer riff live, it's a bit of a downer!

So to the Hatari masters I beg you: is there anything i can do to get rid of this latency?

as always, thanks for your help!

Damo

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1547
Joined: Sun Jul 31, 2011 1:11 pm

Re: audio latency/delay issue

Postby Eero Tamminen » Mon Jul 04, 2016 8:55 pm

There's some latency because there are more layers than on the real device. Besides the emulated Atari device, there's libSDL sound buffer and whatever buffering your OS sound handling does after audio data goes out of the program producing it. These extra buffers are there to avoid audio glitches in case program (like Hatari) producing the audio data gets e.g. scheduled too late.

There's an option to control Hatari's SDL sound buffer size:

Code: Select all

  --sound-buffer-size <x>    Sound buffer size in ms (x=0/10-100, 0=default)

distantminds
Atari maniac
Atari maniac
Posts: 93
Joined: Thu Sep 29, 2005 5:03 pm

Re: audio latency/delay issue

Postby distantminds » Mon Jul 04, 2016 9:08 pm

Hi Eero,

Thank you for your reply - i'll experiment with a low value. Do you know by chance what the default value is?

D

distantminds
Atari maniac
Atari maniac
Posts: 93
Joined: Thu Sep 29, 2005 5:03 pm

Re: audio latency/delay issue

Postby distantminds » Mon Jul 04, 2016 10:06 pm

--sound-buffer-size 10 FTW!

No noticeable problems with breakup/buffer under runs etc.

How about widening the scope of the setting?! 5ms or lower even? :)

Thank you Eero!


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 1 guest