.

.
The Solution

Go there and you'll find your answer, young padawan...
He mean he wants the music to pause as well, am I correct?
The Solution

Go there and you'll find your answer, young padawan...
These are not the droids you are looking for.
My solution offered is for fixing a crash in the engine, it is not related to tabbing out of the game.
These are not the droids you are looking for.
My solution offered is for fixing a crash in the engine, it is not related to tabbing out of the game.
Oh, I miss read the OP... I thought he meant that the game pauses LIKE when you do click out of the game but the music still goes... My bad

Maybe this topic is related. But I'm not sure, the plugin link doesn't work for me.
the plugin link doesn't work for me.
The link is no longer working, but you can get the plugin by going to your MV's installation directory and grabbing it from dlc\RPGmakerWeb_plugins\Zalerinian.

It seems to do the opposite of what OP is asking for, but that might still work (and in fact is probably a better solution) - instead of keeping the entire game running when unfocused, it pauses audio/video alongside everything else.
When the game is unfocused, as in you clicked on something else on your computer, or "tab out" of the program, the game will "pause" (but while music is still playing).
Are you using MZ? By default MZ pauses the game loop, but not the audio, on losing focus.

If you're seeing this in MV, check your plugins?
Yeah, my MV only pauses when the window is minimize.
.
.
Okay, so turns out you all are technically right, when the game is unfocused, everything keeps playing... but I found the issue.

It's not when I unfocus the game that causes this issue, but if I focus on another window!

Basically, if I click on this browser window while and the game is in the background, then the game freezes while the music keeps playing.

I would prefer to fix whatever is going on here. It would be a shame if someone got a pop-up window on their pc or accidentally switched focus to another window and things got out of sync.
So, you want the game to be "fully" paused when out of focus?
Meaning, the bgm would stop playing, and resume playing when back into focus?

This could be achieved by writing a plugin that does just that.

Edit : If that is what you are looking for, I just finished writing a plugin that can do this 🙂
I would prefer to fix whatever is going on here.
So, you want the game to be "fully" paused when out of focus?
Meaning, the bgm would stop playing, and resume playing when back into focus?
This could be achieved by writing a plugin that does just that.

I don't understand the current issue in the thread.

Isn't this solved by the plugin which comes with MV, which @Mac15001900 pointed out in post #7?

What is the different problem which is getting a new plugin?

I'm confused.
I don't understand the current issue in the thread.

Isn't this solved by the plugin which comes with MV, which @Mac15001900 pointed out in post #7?

What is the different problem which is getting a new plugin?

I'm confused.
I don't know the plugin he is referring to, I just thought it would be a fun experience to try and make one myself. ^^

I tested my plugin and it works well, pausing the game entirely, including the bgm, and resumes it when the game has focus again (including bgm which resumes where it was paused using AudioManager._bgmbuffer.seek)

I believe the issue is that when he leaves the game (aka click on another window) the game pauses, but the music doesn't, which makes it go "out of sync", so I suppose the music is an important aspect of his game.

If the plugin mentioned in post #7 does that, then mine offer very little more, either way I had fun making it. ^^
.
It isn't exactly what I needed, technically the opposite, but I would assume what I would need might be more troublesome in the long run. Regardless, thank you.

Let me know if you need it and I'll upload it.
Meanwhile, I'll look into something that does "the opposite" and update my plugin so it can do both 😀

So the opposite would be Making the game run even when out of focus including music, animations, events, etc...

Edit : I can't get it to work when minimized 🙁 but it should work "out of focus", so long as the game is not minimized.

Original thread: https://forums.rpgmakerweb.com/threads/170342/