Sound vs Framerate...How to get 60/60 frams a second

If you're having problems with Snes9x, or think you've found a bug, this is the place to be.
Post Reply
WalMartCartPusher
Snes9x White Belt
Posts: 32
Joined: Thu May 02, 2013 2:33 pm

Sound vs Framerate...How to get 60/60 frams a second

Post by WalMartCartPusher »

Hello...this is my first time post and I would like to share some results of a lot of Aspergery OCD fiddling I have done in the SNES9x settings. I tend to obsess to an annoying degree and as a result I end up getting things configured just right (for my system...Ill get into that later...I just hope it helps others understand what is going on)

The sound timing affects the frame rate:

I need to point out that in order to get the frame rate properly at 60 frames a second one needs to set the audio buffer length accordingly to the input rate. This is more easily done with using USB audio headsets, or any digital output connection on your computer (not the headphone jacks or internal speakers). Xaudio2 is the audio setting as the SNES9x Direct Sound setting is the cause of the crackling from time to time...the DAC connected to your computer should automatically cancel this out so having the proper driver setting is quite important but you still get video frame stutter wit the default audio settings.

I found that the buffer length is directly proportionate to the synchronization mechanisms of the video frames seen in the SNES emulation process (by observation). If one uses the Sync Audio and VSync settings simultaneously, the frame rate would stay solid at 59 and some times drop to 58 or 57. This bothered me immensly as it would ocassionly stutter one or two frames at a time. So I upped the audio buffer length from the default setting up incrementally setting by setting and found that each successive setting would allow more time to video.

Now in the sound settings menu you will find a droop down box for buffer length....I use 64ms for 16 bit stereo playback at a playback rate of 48KHz (the 16-bit @48Khz is very important to set to set it to this when playing on a TV set...otherwise it causes audio cutout...so make sure you set your computer's speaker output settings to the same playback and bit rates). I have "Synchronize with sound source" checked...as well as "Stereo" and "16 Bit playback".

Sound Driver: XAudio 2
Playback Rate: 48KHz
Buffer Length: 64ms
Input Rate: 32000

Notice how the buffer length measured in ms is twice that of the first two digits in the input rate? That should always be your proportion.

Have fun and enjoy smooth game play :)
Post Reply