Audio Lag Fix

Sometimes a sound effect that should be in-sync with an action on-screen will lag, or sound effects that should be played with a delay between them (knocking on a door) will be all stacked up at once. This happens even with .ogg files.

There's an MV script out there that preloads audio to prevent lag. I was wondering if someone could make a script like that for VX Ace, or something similar that fixes the issue. Thank you.
RGSS engine can not preload audio, unfortunately. However, I rarely experience desync when playing sound effects. If anything, the screen will freeze for a moment to load the asset (especially in larger animation when playing them) then the sound synced.

How did you play the sound effect? was it in the battle or event?
In an event. Here's a screenshot in case it helps.

1628584047551.png

Original thread: https://forums.rpgmakerweb.com/threads/audio-lag-fix.139439/