Implement MusicManager fade-out in stopMusic() — was a stub

stopMusic(fadeMs) previously had (void)fadeMs with no fade logic.
Added fadingOut/fadeOutTimer/fadeOutDuration/fadeOutStartVolume state
and wired update() to interpolate volume to zero then stop playback.
Also clean up DuelProposedPacket comment (removed misleading TODO label).
This commit is contained in:
Kelsi 2026-03-09 16:30:42 -07:00
parent f2eabc87ef
commit 13e3e5ea35
3 changed files with 40 additions and 11 deletions

View file

@ -52,6 +52,11 @@ private:
float fadeInTimer = 0.0f;
float fadeInDuration = 0.0f;
float fadeInTargetVolume = 0.0f;
// Fade-out state (for stopMusic with fadeMs > 0)
bool fadingOut = false;
float fadeOutTimer = 0.0f;
float fadeOutDuration = 0.0f;
float fadeOutStartVolume = 0.0f;
std::unordered_map<std::string, std::vector<uint8_t>> musicDataCache_;
};