Is there a way to get an mp3 file's duration without having the user to specify it?
Alternatively, is there a way to make RPG::BGM.play only do it once (instead of looped), and run a check if the file is still being played?
I can do that in midi files. But I never tried in mp3 or ogg. The basic concept is to put the music loop at the end of the music so that they won't be looped. AFAIK, RGSS3 can not get the mp3 file duration. But dunno.
I see. Well, if that's the case, is there a way to stop making the BGM play while the game is not focused (Alt+Tab)?
in an unrelated note, I've also noticed that there's some short lag (~1s) that occurs when loading something from a module for the first time. This lag disappears after the first occurrence though. Is there a way to preload modules when the game starts?
I've tried looking for a way to do that before and, I've never found anything; there's no way that I know of to find whether something is playing. If you absolutely need something to only play once, and need to know when it's done playing, the hacky solution is to use Audio.bgm_pos to find a position near the end of the song and wait for that to be reached, then do whatever you need to do when that happens. I don't know if there's any better solution to that problem, given how RM Audio works (I think there were some FMOD plugins for RM around, maybe those would do the job?).