GMS 2 Small sound problem when paused and resumed

E

eggyeox

Guest
I have a code for all my background music objects, that looks like this:
Code:
if audio_is_paused(mysound)
{
    audio_resume_sound(mysound)
}
else
{
    audio_play_sound(mysound)
}
then in my Room End event, there's only audio_pause_sound
that way if I want audio to continue playing in the next room, it resumes the audio from the previous room, and if it wasn't playing in the previous room, it only plays.

my problem is that when it pauses and resumes there's a tiny skip, like it's not a smooth transition? is there a better way to do this?
 
If you haven't tried this already, you could try using audio_sound_gain(index, volume, time) to fade out the sound when you pause it, and when resuming, use it again to fade in the volume over time.

I haven't tested this, but it might be able to cover the skipping just enough to be unnoticeable.
 
E

eggyeox

Guest
If you haven't tried this already, you could try using audio_sound_gain(index, volume, time) to fade out the sound when you pause it, and when resuming, use it again to fade in the volume over time.

I haven't tested this, but it might be able to cover the skipping just enough to be unnoticeable.
I use that code when I want it to fade out, and it works. But I'm trying to make an intro to my game with multiple rooms, with the same song running the whole time.. It's not a huge skip, it just seems to stop for like 0.01 second and doesn't sound smooth
 
Top