So like a lot of games, I have background music. I’d like the background music the continue playing where it left off when I resume the game after it lost focus.
For example, you get a Facebook message, type something, go back to the game and have the music resume instead of starting over.
I’m not sure if I’m looking over this feature somewhere, but I can’t find it like this. Is this possible at this moment?
Most platforms support seeking (MediaPlay.PlayPosition is settable). However, what you describe should be a standard feature in MonoGame, so this might be a bug.
What platform(s) are you working with?
I’m working in Android using SoundEffectInstance.
I check out the git, and I saw it was a feature that still needed to be implemented, as far as I could see. I would write it if I could, but my understanding of the inner workings in MonoGame are next to none…
Alright, well that’s a reasonable choice. But what about sound effects? I don’t think you wanna have every single sound effect as a Music instance, right? Sounds like explosions should still be able to be resumed where they left off, or else it’ll sound kind of weird when there’s suddenly like 3 explosions going off at the same time, you know what I mean?
That’s what I do with normal pauses. But when the game is closed (multi-tasking), the instance is lost. So when I want to resume it at the same location, a simple Resume() won’t work, as it starts over again.