Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix can't read the Ogg loop tag when metadata has over 255 bytes #167

Merged
merged 1 commit into from
Jul 7, 2018

Conversation

white-mns
Copy link
Contributor

WebAudio can't read the Ogg loop tag under the following conditions.

  • metadata has over 255 bytes (= spans multiple segments)
  • LOOPSTART or LOOPLENGTH appears after byte 256 (= appears after the 2nd segment)

So I fixed it to read as metadata up to the size of the following segment when the segment size of the metadata is 255 bytes.
This behavior is in accordance with the specification of OGG format.

Ogg - Wikipedia
Page structure

When the segment's length is indicated to be 255, this indicates that the following segment is to be concatenated to this one and is part of the same packet.

Ogg Documentation
Packet segmentation

Note that a lacing value of 255 implies that a second lacing value follows in the packet, and a value of < 255 marks the end of the packet after that many additional bytes.

Copy link
Collaborator

@krmbn0576 krmbn0576 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🍣

Copy link
Contributor

@Sigureya Sigureya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am worried about whether to cause an accident involving pull request 143, but basically no problem.
#143
OK!

@krmbn0576 krmbn0576 merged commit ea395a6 into rpgtkoolmv:master Jul 7, 2018
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.

None yet

3 participants