ID3 library wrapper (taglib, id3lib, anything)

Christian Manning cmanning999 at gmail.com
Sat Jul 16 11:10:34 PDT 2011


Walter Strom wrote:

> There are no ID3 (audio tags, 'artist', 'title' et al editing) projects
> for D. There was one called id3, but it was halted 3 years ago at alpha /
> ID3v1.
> 
> And there are mature Taglib & Id3lib, both written C++, but both with C
> wrapper options.
> 
> I've tried to make a D wrapper around Taglib, but all it outputs for now
> are the words "You are a shameful idiot, mister", which I put into the
> failure condition without being aware of how much it'd hurt after a
> hundred runs.
> 
> That C wrapper looks easy — 3 same kind struct typedefs, 2 same kind enum
> typedefs, and a bunch of simple funcs that only seem to require a type
> names replacement and extern (C).
> 
> I've tried, but surely not doing it right:
> 
> Original C: typedef struct { int foo; } Bar;
> I tried:    struct Bar { int foo; }
> and also:   struct Wrp { struct { int foo; } } alias Wrp Bar;
> 
> Original C: typedef enum { foo, etc } Bar;
> I tried:    enum Bar { foo, etc };
> and also:   enum { foo, etc } alias int Bar;
> 
> In addition to my noobish translations, I might also be using it all
> wrong, as I've discovered D a week ago :(.
> 
> It would be so amazing if there was someone in the group who wants / finds
> potentially useful ID3 editing, but isn't a D virgin. It's a pity Taglib
> has simple bindings from C# to Ruby, and the guy who's doing D's is being
> insulted by his own code.
> 
> If anyone has guts: http://developer.kde.org/~wheeler/taglib.html
> The c wrapper: bindings/c/tag_c.h
> The example using it: examples/tagreader_c.c
> 
> Just to make it clear, it's a mere hope there is someone interested, but
> more mature than me, and is not in any way a request-like stuff.
> 
> Long live D,
> Walt

I've actually been working on an audio metadata library from scratch in D!

Right now it doesn't support ID3 of any kind, but that will probably be 
coming soon. The thing is I don't really want to add support for loads of 
metadata formats at the moment because I keep changing things (quite 
drastically) and it would be way too much effort to modify all these 
formats. Once I get it more stable I can add support for other formats.

Before you ask, I haven't released this anywhere yet :)

Chris


More information about the Digitalmars-d mailing list