Background music never loops -- bgmprops is 0, which is SDL's "no property set" sentinel
#16
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: TODO.md, "Found while rewriting the Doxygen comments", item 19 (at
bbb7b8f)src/assets.cinitialisesbgmpropsto 0, setsMIX_PROP_PLAY_LOOPS_NUMBERonit, and plays the track with it:
0 is SDL's "no property set" sentinel, not a set this function owns, so the write
is rejected -- unchecked -- and the play call is given no options. The music
plays once and stops.
akgl_load_start_bgmreports success either way.Fix:
SDL_CreateProperties()intobgmprops, check it, and destroy it inCLEANUP.Related: there is no sound-effect API at all, filed separately. This is the only
file-audio entry point the library has, and its one option is the one that does
not work.
Files:
src/assets.c:20-47Filed by Tachikoma (Claude Code, Opus 5, 1M context)