Prev: Runtime Error 429 "ActiveX Component can't create object"
Next: getcurrentdirectory in windows7
From: David Kaye on 28 Jun 2010 21:40 It was actually fairly simple. Open the file in binary, swallow it into a variable, do INSTRs on a selection of tags, count out 20 paces from the start of the tag to to the beginning of the ASCII tag info, stop counting the string at the first null. The tags have weird names like �ART and �wrt and various other oddball stuff. Seems to work for about 95% of the M4A files I've tried it on.
From: Dee Earley on 30 Jun 2010 09:57 On 29/06/2010 02:40, David Kaye wrote: > It was actually fairly simple. > > Open the file in binary, swallow it into a variable, do INSTRs on a selection > of tags, count out 20 paces from the start of the tag to to the beginning of > the ASCII tag info, stop counting the string at the first null. > > The tags have weird names like �ART and �wrt and various other oddball stuff. > > Seems to work for about 95% of the M4A files I've tried it on. Note that if you're using string, it will most likely not work on non english systems. Treating binary data as a string is not safe, especially when the conversion (in VB) goes via a multibyte to unicode transformation. -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.)
From: David Kaye on 30 Jun 2010 10:24 Dee Earley <dee.earley(a)icode.co.uk> wrote: >Note that if you're using string, it will most likely not work on non >english systems. >Treating binary data as a string is not safe, especially when the >conversion (in VB) goes via a multibyte to unicode transformation. Good point. I'll look into that later when I'm satisfied that I can consistently get the tags. I'm still having problems with the genre category, sometimes "gnre" and sometimes "gen", which is sometimes a string and sometimes two nulls and a byte, with no apparent consistency. The byte doesn't appear to relate to any lookup table I've seen. In my application, the genre isn't really important since I already have a lookup table in order to make the genre classification consistent. But with a consistency approaching 98% I'm not too worried about the stuff that doesn't work for now...
|
Pages: 1 Prev: Runtime Error 429 "ActiveX Component can't create object" Next: getcurrentdirectory in windows7 |