Music stops when window is unactive

Started by Zexion, February 26, 2011, 10:23:38 am

Previous topic - Next topic

Zexion

Okay well this isn't like OMG I NEED THIS, but it is kinda annoying and I want to fix it. I have a pretitle map thing, that shows an intro with music and all and then shows map which is the title. I made it so that the music lines up perfectly with the transition to the title, buuuut whenever I play the game, it starts playing the music even if you minimize the window, and then when you bring it up again the music is in the wrong place, and makes the transition look wierd. Is there a way to stop the music, orrr is there a way to make the event continue even when the window is down?

Blizzard

February 26, 2011, 11:07:08 am #1 Last Edit: February 27, 2011, 04:04:18 am by Blizzard
Cannot be done with RMXP. That is, there is no way to do it properly without the window causing bugs. Sometimes the window would stop the music, sometimes not. Mainly also because RMXP doesn't allow you to pause and resume music.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Zexion


Blizzard

February 27, 2011, 04:05:19 am #3 Last Edit: February 27, 2011, 04:06:26 am by Blizzard
The only way you can achieve pause/resume this is to use a custom audio module. But custom audio modules have a different way of playing back midi files so they don't sound the same as with RMXP's native audio module. But the window thing wouldn't probably work because when you deactivate the RMXP window, it stops executing any code so you can't pause the music there.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G


Blizzard

Ah, he made an additional exe. Well, this is one way of doing it.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Zexion

hmm idk what is wrong, but I did what it said. (inserted the script, placed the exe in the folder)
It wont pause, but it does make it sound slightly jumpy.