Skip to content

Play music across cgame restarts #1772

@slipher

Description

@slipher

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions