Skip to content
Snippets Groups Projects

Fix music load lag by reverting tag changes

Merged mazmazz requested to merge public-musicplus-tagfix into next

Since public-musicplus-core was merged, music would load while freezing the game for a moment. Most noticeable with jingles.

This happens because I changed the tag reading. So this merge has two commits:

  1. Removed MP3 tag reading. It's slow, and it's wrong according to ID3 spec.
  2. Removed LENGTHMS= tag. This is only an issue because all current songs don't have this tag, which causes the code to search the entire lump from beginning to end.

This reverts the tag behavior to what it was before, and resolves the skip-lag.

LENGTHMS= isn't really necessary for now, but if jingle resuming is implemented, the game will need a way to grab the song's length. Maybe it can be a field in MUSICDEF

Edited by mazmazz

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • mazmazz changed title from Fix music loading lag by reverting tag changes to Fix music load lag by reverting tag changes

    changed title from Fix music loading lag by reverting tag changes to Fix music load lag by reverting tag changes

  • mazmazz changed the description

    changed the description

  • Weird. I tried building the next branch and testing for freezes, but got nothing. Even sent the build to a friend and had them test it on their machine, still got nothing...

    Edited by wolfs
  • Author Contributor

    Try with a super big music lump -- 10 or 30 megabytes or so. See how long the freeze lasts between next and this branch.

  • Yeah, this branch significantly reduces the skiplag with large files. Tested with a ~20MB file and the difference was a good two seconds.

  • merged

  • wolfs mentioned in commit e394f41c

    mentioned in commit e394f41c

Please register or sign in to reply
Loading