[DUG] C code help

Dennis Chuah dennis_cs_chuah at hotmail.com
Fri Jul 14 00:02:54 NZST 2006


Direct translation:

const
  TAG_FIELD_FLAG_DATA_TYPE_MASK = 6;
  TAG_FIELD_FLAG_DATA_TYPE_TEXT_UTF8 = 0 shl 1;
  TAG_FIELD_FLAG_DATA_TYPE_BINARY= 1 shl 1;
  TAG_FIELD_FLAG_DATA_TYPE_EXTERNAL_INFO = 2 shl 1;
  TAG_FIELD_FLAG_DATA_TYPE_RESERVED = 3 shl 1;


----- Original Message ----- 
From: "Ross Levis" <ross at stationplaylist.com>
To: "NZ Borland Developers Group - Delphi List" <delphi at ns3.123.co.nz>
Sent: Thursday, July 13, 2006 9:07 PM
Subject: Re: [DUG] C code help


Just to clarify this a bit...

An audio file tag format uses 4 bytes to store a flag to indicate whether 
text or binary information is stored in the following tag.  The C++ source 
code uses these definitions

#define TAG_FIELD_FLAG_DATA_TYPE_MASK           (6)
#define TAG_FIELD_FLAG_DATA_TYPE_TEXT_UTF8      (0 << 1)
#define TAG_FIELD_FLAG_DATA_TYPE_BINARY         (1 << 1)
#define TAG_FIELD_FLAG_DATA_TYPE_EXTERNAL_INFO  (2 << 1)
#define TAG_FIELD_FLAG_DATA_TYPE_RESERVED       (3 << 1)

Am I correct in assuming that a Binary flag will appear like this in the 
file (in Hex).

00 00 00 02

Effectively a big endian value of 02.  Is this correct?

Thanks,
Ross.
  ----- Original Message ----- 
  From: Ross Levis
  To: NZ Borland Developers Group - Delphi List
  Sent: Thursday, July 13, 2006 8:17 PM
  Subject: Re: [DUG] C code help


  > So TAG_FIELD_FLAG_DATA_TYPE is a one-bit flag stored in the 
2nd-rightmost bit of the word, and its possible values are TEXT_UTF8 (value 
0) and BINARY (value 1).

  I see.  Thanks for that.

  Cheers,
  Ross.
    ----- Original Message ----- 
    From: Brian Wrigley
    To: NZ Borland Developers Group - Delphi List
    Sent: Thursday, July 13, 2006 7:32 PM
    Subject: Re: [DUG] C code help


    That's the bitwise shift-left operator. So, 0 shifted left 1 bit is 
still zero, 1 shifted left 1 bit is 2. 1 shifted left 30 bits would be (hex) 
40000000.

    Brian


------------------------------------------------------------------------------


  _______________________________________________
  Delphi mailing list
  Delphi at ns3.123.co.nz
  http://ns3.123.co.nz/mailman/listinfo/delphi



--------------------------------------------------------------------------------


> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
> 


More information about the Delphi mailing list