Skip to content

Fix dshow endgame music - #637

Merged
NovaRain merged 3 commits into
sfall-team:masterfrom
BGforgeNet:fix-dshow-endgame-music
Oct 27, 2026
Merged

NovaRain merged 3 commits into
sfall-team:masterfrom
BGforgeNet:fix-dshow-endgame-music

Conversation

@burner1024

Copy link
Copy Markdown
Contributor

Ref BGforgeNet/Fallout2-HQ-music#9

Neuroslop warning: debugged and fixed with LLM assistance.
I tested the fix, and it works, but I'm not 100% sure it's solid. Please check it out.

With AllowDShowSound=1:

  • map music plays over the endgame slides;
  • the credits song (akiss) loops and keeps playing after the credits;
  • the music after it (10labone) never starts.

Fixes:

  • gmovie_play_hook_stop is also hooked at 0x43F9B1 (endgame_init_) and 0x43F813, 0x43F886, 0x43F89C (endgame_movie_). With sfall playing the music, gsound_background_stop_ has nothing to stop.
  • Engine music is played once when background_loop_requested (0x518E70) is 15, then the callback in gsound_background_callback_fp (0x518E58) is called, as for ACM music. Only akiss is requested this way; its callback lets endgame_movie_bk_process_ start 10labone.

With AllowDShowSound, gsound_background_stop_ does not stop music played via DirectShow, so map music played over the
endgame slides and the credits music kept playing afterwards.
… end callback

The endgame credits song looped forever and the music after it never started, since sfall looped all engine music.
@NovaRain
NovaRain merged commit 4e5caf6 into sfall-team:master Oct 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants