-
Notifications
You must be signed in to change notification settings - Fork 63
Description
When connecting to a server the music often restarts several times in quick succession. It would be nice if the music could keep playing continuously instead of restarting. What if we allowed the background music to keep playing after a cgame shutdown? Then the next cgame could decide to do nothing (thereby allowing any music to keep playing), replace it with different music, or stop the music.
I think we could get by without any cgame-side state tracking (e.g. via cvar) or engine introspection APIs by just following some rules like:
- (Re)start music when going to main menu
- Stop music when entering the game
- Start music when exiting a game
This could blunt the load time performance hit that we will probably take from fixing #1771 (we'll have to reload sounds instead of caching them forever). We could keep the music sample alive upon cgame exit while unloading all other sounds.