rpgtkoolmv / corescript

http://www.rpgmakerweb.com/products/programs/rpg-maker-mv
MIT License
311 stars 75 forks source link

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

Closed white-mns closed 6 years ago

white-mns commented 6 years ago

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

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.