WebAudio cache [experimental]

removed
I'll have people test this out as well. Thanks for the plugin 🙂
Hi Orlando!

Thank you for giving all the RPG Makers a fix (even if it's an imperfect and provisional one) for this annoying 'bug'.

I have been using your plugin for some days and the BGM delays stopped at the expense of the loading of the maps being slower. But then I noticed that there are some maps (I've found two of them by now) that never load. Once you enter them, a black screen is permanently showing and the BGM of the former map keeps playing.

I have the following configuration for the TDDP_PreloadManager:

"Preload On Map Load = true

Preload System Music = false

Preload System SFX = false

Print Debug to Console = true"

It's interesting to note that when I turn to 'false' the Preload On Map Load option, the problem with the maps dissapears. However, having this option disabled, the plugin doesn't work anymore and the BGM keep playing with delay.

Hope I contribute somehow with my experience and I really wish this bug can be totally fixed soon.
removed
Could you please try the following two things:

1. Please check if those maps load if you set "Preload On Map" to true, but with the WebAudio Cache plugin disabled

2. Also, please press F8 when a map doesn't load, then click the "Console" tab at the top and see if you can spot any JavaScript errors (they will be written in a bright red) - you might need to scroll up a bit. If you can, please make a screenshot of the error with the "Print Screen" key and attach it so we can see what is going on

Thanks for your answer!

1. As you maybe guessed, the maps load fine when "Preload On Map" is true, but with the WebAudio Cache plugin is disabled.

2. There are no red errors shown in the console. How can I attach here some screenshots of what appear in my console before and while entering one map that doesn't load?
removed
Ups! Thank you, my mistake. Here I attach now the screenshots.

I disabled all my plugins except PreloadManager and WebAudioCache and the problem with the maps continue.

I tried to put the WebAudioCache plugin at the bottom too but the result is the same.

1.jpg

2.jpg

3.jpg
removed
Hi again Orlando.


Today I found that the plugin still has a bug when transporting to one map. When I try to enter to this map, there is a perpetual black screen and the map never loads.


I thought this issue was fixed with your last update, but it seems to be still there. It seems to keep loading all the sounds but freezes at (211/213) and sometimes the games shuts down. Here I attach some screenshots with the console log:


P.D.


The map that doesn't load is using the Masked's MBS - Map Zoom plugin, maybe it's an incompatibility with that plugin.

2.jpg

1.jpg
removed
This plugin is a real life saver! I have a public launch w/ live demonstration tomorrow night, and I just found out about the audio lag stuff today. My new laptop that I'm using to demo has the lag issue real bad. Plus, it's nice to know that the crucial audio will trigger at the same time for all users. I was panicking until I found this fix. So thanks a lot for this plugin!
Thanks for the plugin! I started down the Web Audio API rabbit hole last night when my converted project's cutscenes were ripped apart by the audio delay. Thank you for saving me a trip 🙂  I'll do some testing and let you know if I see anything odd. Out of curiosity, I noticed in your code above that if the audio has been cached > 5 minutes ago, then you purge. It occurs on map change, but what about when changing to a battle? That's not considered a "map change" is it? It's a scene change, I think...thus we are on the same map and the purge logic doesn't get called, correct? 


Scenario:


1. I play a BGM in a map cutscene that leads into a battle. 


2. I have written a plugin that removes the call to kill all audio prior to a battle & removes the call to play the battleBgm. Effectively, "building into" a battle using the bgm that was used on the map.


My concerns:


1. Should I expect 5 minutes into a battle, having the purge logic purge the bgm? Or is it going to wait until I actually change maps?   
removed
Btw, I think that thing must be used for EVERY resource, not just an Audio. Do you think so?
removed
Maybe it sounds stupid, but how do I download/get this plugin?
So I just installed this and my music is still stuttering and lagging. I have the Preload Manager plugin first on the list with all 3 Preload areas set to True, and I have this plugin second.


Im running MV on Windows 10, and just using the Test Play, haven't built anything out yet.
I want to make a suggestion, lets imagine a guy have 200 ogg files in his project and each one is 10mb.

Installing preload Manager and WebAudio cache make the game download 2 GB on every run, so, game takes forever to load.

Then, what about making a preload script or plugin command? lets think about a script like this:

preloadSong("My_heavy_song.ogg");

or a command like this:

PreloadSong My_heavy_song.ogg

This way users can preload a single music in a previous scene before playing it and load the heavy song needed only. I think this is the most efficient way to do this.

I hope you like this suggestion 🙂

(and sorry for my english)

Original thread: https://forums.rpgmakerweb.com/threads/webaudio-cache-experimental.51422/