Anti-Audio Delay plugin for RPG Maker MV
A downloadable tool
When playing audio in RPG Maker MV events, there's a small delay when the audio loads to when it's actually played. This can make some scenes lose impact where an emotional piece of music is supposed to be played, but it gets delayed instead and ruins the moment.
What this plugin does is go through the currently running event's command list by a certain amount and loads ahead of time the audio files it finds. This way, the audio files are ready by the time the event runs, making it transition smoothly.
This plugin does not preload and store audio files forever because that's a very quick way to get your game client to crash when it consumes more memory than the player's computer can handle. Instead, it will save a designated amount of audio files in its cache to keep them ready in case they're reused but will flush them out of memory when the limit has been reached. This is to ensure that memory doesn't overflow and crash the game.
Load Ahead Index By
This is how many event lines the plugin will look ahead to search for audio files to load into the cache. Keep in mind this is lines, not actual event commands. Events that have multiple lines like messages will count for a different amount of lines. Therefore, it's safe to have this look ahead by a large number like 10.
Each of these for BGM, BGS, ME, and SE all do the same thing: store a number of audio files in quick accessible memory for the game client to use and call when needed. If the amount exceeds the limit declared on the plugin parameter, then the oldest entries will be flushed out of memory until the cache is at the limit amount.
These will clear the audio caches for the written type of audio. If you pick all, then all four types will be flushed out of memory. This will give your game a clear slate for the the audio cache, which means the game may lag a little bit upon reloading the new BGM files.
In my opinion, these plugin commands should never need to be used since the plugin will automatically clear them once the cache goes over the limit, but I'm just giving you control over the audio cache for your game just in case you want to do something with it.
RPG Maker Version
This plugin is made for and tested on RPG Maker MV with version 1.6.2. I cannot guarantee if it works on lower versions.
1. These plugins may be used in free or commercial games.
2. 'RPG Maker Irina' must be given credit in your games.
3. You are allowed to edit the code.
4. Do NOT change the filename, parameters, and information of the plugin.
5. You are NOT allowed to redistribute these Plugins.
6. You may NOT take code for your own released Plugins.
- 2019.02.27 - Fixed a bug that removed audio files from cache if there were multiple copies still in line for the cache limit.
- 2019.02.25 - Fixed a bug that was made by a typo
Click download now to get access to the following files: