How do I fix audio lag on dolphin emulator?

Dolphin is an open-source Nintendo GameCube, Wii, and Triforce emulator for Windows, macOS, Linux, and Android that allows PC gamers to enjoy classic Nintendo games in HD quality. However, many users have reported issues with audio lag or delay while using Dolphin, where the game audio falls out of sync and lags behind the graphics.
This audio delay can negatively impact gameplay and enjoyment of classic Nintendo titles emulated on Dolphin. The lag happens because Dolphin struggles to properly synchronize and process audio fast enough to match the graphics emulation. There are various potential causes and solutions to explore to address this audio lag problem.
Check Audio Backend
One of the most common causes of audio lag in Dolphin is using the wrong audio backend. Dolphin supports various backends like DirectSound, XAudio2, OpenAL, Cubeb etc. Each has its own advantages and disadvantages. The default is DirectSound on Windows but you may get better results by trying a different backend.
Many users have reported fixing audio lag by switching to the XAudio2 backend. According to the Dolphin forums, XAudio2 has “Lower latency, better timing, better quality.” [1]
To change the audio backend, go to Options > Audio Settings in Dolphin. Under “Audio Backend”, select a different option like XAudio2 and test if it resolves the lag. You may need to experiment with different backends to find the optimal one for your setup.
Cubeb is another popular backend that aims to provide low latency audio and uniform behavior across platforms. The Cubeb backend may be worth trying if XAudio2 does not improve the lag.
Dolphin will likely default back to DirectSound when you restart the emulator. So remember to double check the audio backend setting if the lag returns after closing and reopening Dolphin.
Update Graphics Drivers
One of the most common causes of audio lag in Dolphin is outdated graphics drivers. Dolphin is a demanding emulator that pushes hardware to its limits, so having up-to-date drivers is crucial for performance.
You should update to the latest stable graphics drivers from Nvidia or AMD depending on your GPU. Keeping drivers updated ensures you have the latest performance optimizations and bug fixes that can resolve audio lag issues.
According to the Dolphin forums, there have been issues with older Nvidia drivers improperly utilizing buffer storage in Windows which caused stuttering and lag https://dolphin-emu.org/blog/tags/driver/. Updating to the latest Nvidia or AMD drivers has resolved audio lag for many users.
Dolphin developers recommend updating to the latest GPU drivers as a first troubleshooting step for performance issues like audio lag. With updated, stable drivers you can rule out driver-related problems.
Disable Audio Enhancements
Many Dolphin users have reported significant audio lag and stuttering when audio enhancements or effects are enabled, either in Dolphin’s settings or at the system level. According to the Dolphin Emulator Performance Guide, Dolphin will usually handle enabling/disabling audio enhancements automatically for optimal performance. However, occasionally you may need to manually disable any audio post-processing effects or enhancements.
In Dolphin’s Audio settings, make sure thataudio stretching, audio auto-sync, and volume are disabled. These settings can introduce lag into the audio pipeline. Also check your system sound settings and disable any audio effects like virtual surround sound, bass boost, or equalizers. Keeping the audio signal unchanged can help prevent emulation latency issues. As recommended on the Dolphin forums, using stereo audio without enhancements provides the most stable experience.
Once you’ve turned off all unnecessary audio processing, test the emulator again to see if the lag is reduced. With a clean audio output path, Dolphin should be able to deliver a tight, latency-free audio experience during gameplay.
Adjust Audio Buffers
One key setting you can tweak to help fix audio lag in Dolphin emulator is the audio buffer size. The audio buffer is essentially a short delay that the emulator adds to help prevent buffer underruns that can cause stuttering and lag. https://forums.dolphin-emu.org/Thread-setting-recommendations
By default, Dolphin sets the audio buffer size fairly conservatively at around 80-100ms. For some systems and games, this large buffer can introduce noticeable lag between the video and audio. Try decreasing the audio buffer size in 10-20ms increments to see if it reduces audio delay without causing crackling or popping. Values around 40-60ms tend to work well, but this can vary based on your specific hardware. https://forums.dolphin-emu.org/Thread-can-t-manage-audio
If lowering the buffer size causes audio glitches, try raising it up again in increments. Find the lowest setting that avoids pops and clicks during gameplay. Just keep in mind that larger buffer sizes can reintroduce audio lag. Many users find a balance at around 60ms, but your ideal setting will depend on your CPU, GPU, drivers and the game itself.
Enable Async Mixing
Enabling the “Async Mixing” setting in Dolphin can help reduce audio lag and stuttering. This feature allows the emulator to process audio asynchronously from the graphics, which helps prevent delays in the audio pipeline that can lead to lag.
As explained in this Dolphin blog post, without async mixing, the emulator has to process graphics and audio together in lockstep. This can cause the audio to lag behind if the graphics pipeline gets bogged down. With async enabled, the audio mixing happens independently, allowing the audio to keep up.
The downside is that async mixing can potentially cause audio glitches in some games. But in most cases, it should provide a smoother audio experience and eliminate lag. If you’re experiencing pesky audio delays, try toggling this setting on to see if it helps align the audio better with the visuals.
Limit Frame Rate
One way to fix audio lag in Dolphin is to cap the game’s frame rate to your monitor’s refresh rate. Many emulated games can run at extremely high frame rates, which can put extra strain on your PC and cause audio desync. According to the Dolphin forums, audio is often tied to framerate in GameCube/Wii games. If the game is running too fast, the audio can lag behind the video.
To limit the frame rate in Dolphin:
- Go to Graphics > Advanced
- Under “Frame Limit,” check “Enable Frame Limit”
- Set the frame limit to your monitor’s refresh rate (usually 60fps or 120fps)
This will prevent the game from running at excessively high frame rates and help synchronize the audio. Keeping the game capped at your monitor’s refresh rate can help eliminate crackling sounds and audio desyncs.
Close Background Apps
One common cause of audio lag in Dolphin emulator is too many background apps or programs running while emulating games. Background apps can consume RAM, CPU, and GPU resources that the emulator needs to run smoothly.
Try closing any other intensive programs before starting up Dolphin. This includes web browsers, video or music players, live wallpapers, and especially other emulators like PPSSPP or RetroArch. You may also want to disable auto-starting apps in your device’s settings.
Freeing up resources by shutting down background tasks allows Dolphin to utilize more RAM, CPU time, and GPU cycles for lower latency audio and smoother overall performance. Fewer competing processes reduces the chance of stuttering, choppy audio, or lag.
According to user reports on Reddit and Dolphin forums, completely closing out battery-draining apps before emulating can significantly improve audio lag on Android and other platforms. For best results, only run Dolphin and the game ROM itself.
Overclocking
Moderate overclocking of your CPU may help reduce or eliminate audio lag in Dolphin. Overclocking increases the processing speed, allowing Dolphin to run the emulation more efficiently. However, take care not to overclock too aggressively as that can lead to system instability or other issues.
Some users on the Dolphin forums have reported success reducing audio lag through overclocking:
“You could try overclocking, that might put you where you need to be.”
Overclocking may not completely solve audio lag on its own, but even a moderate overclock can provide a performance boost to help. It’s one option to try in combination with other tweaks like adjusting audio buffers and disabling enhancements.
Conclusion
In summary, there are several potential fixes to try if you are experiencing audio lag in Dolphin Emulator.
First, make sure Dolphin is using an optimal audio backend like XAudio2 on Windows or PulseAudio on Linux. Updating your graphics drivers can also help reduce audio lag in some cases.
Disabling any audio enhancements through your sound control panel and adjusting Dolphin’s audio buffer size may resolve lag issues. Enabling the Async Mixed setting can reduce dependency between audio and graphics timing.
If all else fails, limiting the emulator’s frame rate, closing background apps, and overclocking your CPU may provide further performance improvements to fix any lingering audio sync problems.
With some experimentation with these troubleshooting tips, you should be able to achieve smooth, lag-free audio playback in Dolphin Emulator.