You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Listening for the error event when decoding an MP3 Asset often reports bad main_data_begin pointer or Huffman data overrun errors. Contrary to the Asset class documentation, the decoding process finishes afterwards, apparently successfully. Errors of the type UnderflowError and Error: Invalid layer, however, are thrown as simple exceptions - and being thrown asynchronously, they are impossible for client code to catch. It'd be useful if they were reported through the error event, with the less fatal errors being perhaps moved to a warning event.
The text was updated successfully, but these errors were encountered:
Bumping this issue in case @audiocogs didn't get a notification when I created it (my account was flagged as a robot at the time, and thus rendered invisible to other users.)
Answering this so that others looking for an answer might find it in the future.
The main_data_begin value is part of the "side information" of every MP3 frame. It follows the frame header (or the CRC if used) and points to the location of the data to be decoded in the bit reservoir (that is, a pointer into the data area of previous frames where the decoder should start decoding).
The "bad main_data_begin" error means that the main_data_begin pointer references a frame that doesn't exist. I have encountered it when I take a live stream and start decoding in the middle of the stream. If the bit reservoir is enabled, the main_data_begin pointer could point to frames that weren't received since they occurred before the player started.
Listening for the
error
event when decoding an MP3 Asset often reportsbad main_data_begin pointer
orHuffman data overrun
errors. Contrary to the Asset class documentation, the decoding process finishes afterwards, apparently successfully. Errors of the typeUnderflowError
andError: Invalid layer
, however, are thrown as simple exceptions - and being thrown asynchronously, they are impossible for client code to catch. It'd be useful if they were reported through theerror
event, with the less fatal errors being perhaps moved to awarning
event.The text was updated successfully, but these errors were encountered: