fs2open.github.com icon indicating copy to clipboard operation
fs2open.github.com copied to clipboard

FR: preloader for "change-soundtrack" sexp

Open skdKitsune opened this issue 1 year ago • 2 comments

From my experience, soundtracks that are called via the "change-soundtrack" sexp don't get preloaded on mission load, which can lead to a stutter (or micro freeze) when the soundtrack change occurs in mission.

Goober5000 has confirmed that there's currently no preload function for the sexp.

skdKitsune avatar Oct 15 '24 14:10 skdKitsune

I looked into this briefly, and it would probably be quite a bit of work to implement a preloader. To the extent that audio files are loaded ahead of time, it is only for the current soundtrack. There are no data structures to preload other files. It's not like model files where they are loaded even if the ship class hasn't arrived yet.

Goober5000 avatar Nov 18 '24 07:11 Goober5000

I looked into this briefly, and it would probably be quite a bit of work to implement a preloader. To the extent that audio files are loaded ahead of time, it is only for the current soundtrack. There are no data structures to preload other files. It's not like model files where they are loaded even if the ship class hasn't arrived yet.

Ahh, that's a shame. The stutter that's introduced by a soundtrack change is pretty noticeable imo. Welp, guess this'll take a while, then.

skdKitsune avatar Nov 18 '24 20:11 skdKitsune