Default audio_rate_control_delta value 0.005 is bad and quite audible

I think a better test would be to load a ROM that plays tones and we can test them right in RetroArch. I seem to recall such a thing existing but I can’t find any examples now.

I did. But your comment about 0.005 being inaudible doesn’t really concur with three other people that say they can hear a difference when using the test tool posted by @Mednafen (here )

@hunterk Sound like the best route. It would be great if you could retrieve that ROM somewhere.

Would love to test this after reading these comments :grinning:

If you can clearly hear the working of “Dynamic Audio Rate Control” then there is something wrong with the stability of the refreshrate of your display or vsync dropouts.

Lets say your display is exactly 60.00Hz, so +0.5% is 60.3Hz and -0.5% is 59.7Hz.
No display fluctuates like that!
Usually the display refreshrate fluctuates at the second or third decimal point form heat so 60.000 ± 0.01Hz.

@James-F I don’t hear anything strange when using Retroarch, but I was/am referring to the tests that have been done with the tool posted by Mednafen.

Did you have a chance to test the tool by @Mednafen posted previously in the thread?

See his post here

Yes I’ve tested if I can hear a 0.5% difference in pitch in my DAW with various sine tones.
Yes, I can clearly hear the difference in pitch when switching quickly between the two.

Again, the “Dynamic Audio Rate Control” should NOT fluctuate all the time, it has a ±0.5% tolerance for extreme cases of extremely shitty displays.

It is very easy to set the wrong value for screen refresh rate by the way.

There’s an issue where it does not discard the times collected immediately after the screen mode switch, which badly skew the estimate for the refresh rate. If you press Enter at the estimate value before 20 seconds have passed, you have just copied a bad value into the refresh rate estimate and thrown off the rate control system.

For the test case I use to hear the warbles, it’s the Save rooms from Battle Kid Fortress of Peril, or track 15 from the NSF file. edit: Looks like Retroarch doesn’t do NSFs, so if you have the actual rom, use BK1MUSIC as the password and play track 0E, or play the Demo and get to a save room.

1 Like

Holy moly! Years of tuning guitars made my ears battle hardened for this. I managed to succeed down to 1.002! :slight_smile:

EDIT: But, honestly, if we can stand listening to lossy compressed audio, it shouldn’t matter the default setting in RetroArch.

Lossy compressed audio doesn’t warble. It cuts out high frequencies deemed unimportant or out of range of human hearing.

Anyway, got the test tool working, it takes me until about 1.00015 before I don’t hear the warble anymore.

Then, it depends on everyone’s sensitivity to unintended fluctuation or degradation. I say that those “unimportant” frequencies supposed to be out of range of human hearing are very noticeable for some people (like me) yet I can stand the warble in RetroArch. To each their own.

EDIT: By the way “1.00015” is godly impressive, to say the least. I don’t think many people can go that low and consistently retain their accuracy. I think you could set a world record, that would be cool.

Pardon me, can someone please remind me what is the purpose of this thread?

We’re trying to get the warbles out of Retroarch.

As you already said, it is important that one properly calibrates the “Vertical Refresh Rate”, all else timing skew parameters are good at default.

Retroarch is actually very accurate in measuring the screen refresh rate and measures 6 digits beyond the decimal point, so it is important to let it measure for 2048 samples.

BTW, These are excellent and very accurate (same company and algorithm):
https://www.vsynctester.com/index.html
https://www.displayhz.com/

You can use the latter for a minute and copy (type) the value to retroarch.cfg for most accurate results.
video_refresh_rate = "59.950238"

Does refresh rate calibration matter/work right on high refresh displays? I usually leave it at the default 59.940 and use swap interval 2 to frame double to 120 and get perfectly smooth scrolling. I’m just curious.

What your “estimate screen framerate” say?

If it says 120Hz and you set “Vertical Refresh Rate” to default 59.94Hz, the result is that “Audio Maximum Timing Skew” and “Dynamic Audio Rate Control” do absolutely nothing, and you will get dropped frames once so often.

With swap interval set to 1 at fixed 120hz (no gsync/freesync) it seems to blink between 59.999 and 60.2 after 2048 samples. With swap interval 2 it settles at 59.995. I don’t think I’ve noticed dropped frames with swap 2 at the default 59.940, but maybe I’ll throw 59.995 in my config and see if it feels any different.

Oh, I didn’t realize that the “estimate screen framerate” reads AFTER the “Swap Interval” option.
In that case, the game runs at what you set in “Vertical Refresh Rate”, and “Dynamic Audio Rate Control” fixes the small error between the set refreshrate 59.94 and your real refreshrate (59.999/59.995/60.2) dynamically in real time.

You will not have dropped frames if “Vertical Refresh Rate” is close to your real refreshrate by a ratio of ±0.5% so “Dynamic Audio Rate Control” can handle it.
To make this error smaller simply press “X (joy)” or “Enter (keyb)” on “Estimate Screen Framerate” after it’s done 2048 samples to set the measured value to “Vertical Refresh Rate”.
“Start (joy)” or “Space (keyb)” will restart the “Estimate Screen Framerate” measurement.

I think this should be clearly documented in Retroarch manual and every user should be familiar with what these options are doing, this should not be a mystery.

The title of this thread is very misleading.
If one hears the working of “Dynamic Audio Rate Control” then there is something very wrong with the stability of their display, and/or did not calibrate the refreshrate.

1 Like

Howdy libretro audio skew experts! Would any be willing to take a look at a MAME 2003 question regarding the libretro API that touches on setting the FPS and how it relates to skewed audio?

This is the discussion? https://github.com/libretro/mame2003-plus-libretro/pull/50#issuecomment-380596350

Set the Audio Maximum Timing Skew setting lower than 0.05 if you don’t want games that run at 57 or 58 Hz to be adjusted to 60 Hz.

1 Like

Just wow.May i ask what’s the best settings for audio settings? Is there a easy answer?