Anti-Audio Delay (Irina)
This is a plugin created for RPG Maker MV.
For help on how to install plugins, click here.
For help on how to update plugins, click here.
Got errors with your RPG Maker MV plugin? Click here.
This is a plugin created by Atelier Irina.
You can also follow Atelier Irina on itch.io.
Support e-mail: rpgmakerplugins+Irina@gmail.com
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. Some of the plugin parameters require the later updates of RPG Maker MV for you to be able to use their entries so please update RPG Maker MV to the latest version if you want the best experience in using this plugin.
You are only allowed to use the plugins made by Atelier Irina if you agree to all of the following:
- These plugins may be used in free or commercial games.
- 'RPG Maker Irina' must be given credit in your games.
- You are allowed to edit the code.
- Do NOT change the filename, parameters, and information of the plugin.
- You are NOT allowed to redistribute these Plugins.
- You may NOT take code for your own released Plugins.
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.
There are Plugin Parameters that you may configure for this plugin.
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.
Here is a list of Plugin Command(s) that you may use:
FlushAudioCache BGM FlushAudioCache BGS FlushAudioCache ME FlushAudioCache SE FlushAudioCache ALL
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.
- 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