[ID3 Dev] How do I deal with this problem COMM frame

Brian Schiffhauer Brian at schif.org
Tue Apr 3 06:09:01 PDT 2007


I was just wondering ... what is the purpose of a syncsafe integer?


----- Original Message ----- 
From: "Ben Bennett" <fiji at ayup.limey.net>
To: <id3v2 at id3.org>
Sent: Tuesday, April 03, 2007 08:54
Subject: Re: [ID3 Dev] How do I deal with this problem COMM frame


> On Tue, Apr 03, 2007 at 06:34:54AM +0100, Paul Taylor wrote:
>> Its V24, what are their different ways of writing frame sizes ?
> 
> Welcome to syncsafe size hell.
> 
> Basically, in 2.4 the frame sizes are written as syncsafe integers,
> whereas in 2.3 they were normal integers.
> 
> http://id3.org/id3v2.4.0-structure has the full details (see section 4
> for the frame header info, and section 6.2 for the unsync integer info).
> The short version is:
>  If the size is 1000, then that is 0x03e8 (hex) which is:
>    00000000 00000000 00000011 10111000
>  But syncsafe numbers are basically spread out so they never put
>  values in the high bit of a byte (e.g. X0000000).  So the above
>  becomes:
>    00000000 00000000 00000110 10111000
>                             ^-- added
>  Which is the number 0x06e8 which is 1768 (decimal).
> 
> The hell part arises because some software (iTunes) does not implement
> the spec correctly and reads and writes regular integers rather than
> unsyncronized ones when dealing with 2.4.  :-(
> 
> -ben
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
> For additional commands, e-mail: id3v2-help at id3.org
> 
>



---------------------------------------------------------------------
To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
For additional commands, e-mail: id3v2-help at id3.org



More information about the ID3v2 mailing list