Run the sound manager's job at 60 Hz with whole steps above 60 fps.

The job (main+0x415300) hands the time manager's step to the sound system in its phase 0 and runs the sound objects'
and the system's updates in phases 1 and 2. With the set ostep that step is a fraction of a frame above 60 fps, and fed
fractions the game has been reported to keep sounds held after an area unloaded until no voice was free, new sounds
and then the music going silent until a restart. The new set osound (sound_steps, on by default) calls the page's
+0xf10 after the job's prologue: phase 0 adds the step to what the job is owed and runs once a whole step has built
up, phases 1 and 2 follow that choice, and a job that does not run gets phase 3, which returns through its own
epilogue. After phase 0's load of the step the page's +0xf00 makes a fraction one whole step. At 60 fps and below
the job runs every frame with the game's step. Both sites were checked against the module; frame_step_check covers
the gate at 60, 30, 144 and 240 fps. Needs the game code generated again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 05:50:19 -05:00
parent f512a98988
commit 328554e7c6
8 changed files with 157 additions and 4 deletions

View File

@@ -52,6 +52,10 @@
# frame's time holds, and the game dropped the rest: above 60 fps every frame ran none, so they stood still under Link.
# 1 keeps the rest for the next frame, 60 steps a second at any frame rate; 0 is the game's own count. Read at start.
# water_steps = 1
# Above 60 fps the game handed its sound system a fraction of a frame each frame, which was reported to keep sounds
# held after an area unloaded until new sounds and then the music went silent. 1 runs the sound system 60 times a
# second with whole frames while the frame rate is above 60; 0 is the game's own step. Read at start.
# sound_steps = 1
# A movie's narration and fades follow the picture on screen: 1 counts their time from the shown picture's
# timestamp, so they stay with it at any frame rate (with movie_fps = 0 too) and wait when the picture stalls; 0 counts
# the game's redraws, as before, which keeps them with the music when the picture stalls. Read at start; needs game