Rob,
Thanks for your fast response! [BTW, I'm on mad-dev now...]
I documented some of the interface here:
http://www.mars.org/mailman/public/mad-dev/2002-January/000439.html
Thanks, this is very helpful.
frame = id3_frame_new("XXXX"); id3_tag_attachframe(tag, frame);
It's funny, I didn't notice id3_frame_new because I assumed that all of the functions I would need were in id3tag.h (since most of them were already there).
Your ::ExportID3() looks good; try the following MakeID3Frame() instead:
Strange, I tried to add your functions and I'm getting linker errors with all of the functions I try to call which are not in id3tag.h. Does this make any sense? (It's possible it's my fault, but I did a make clean, I'm linking to libid3tag.a from mad-0.14.2b, and there were no compiler warnings...):
obj/Tags.o: In function `MakeID3Frame(char const *, char const *)': /home/dmazzoni/audacity/src/Tags.cpp:214: undefined reference to `id3_frame_new(char const *)' /home/dmazzoni/audacity/src/Tags.cpp:217: undefined reference to `id3_latin1_length(unsigned char const *)' /home/dmazzoni/audacity/src/Tags.cpp:219: undefined reference to `id3_latin1_decode(unsigned char const *, unsigned long *)' collect2: ld returned 1 exit status
Is it possible that these functions are not being exported?
- Dominic
struct id3_frame *MakeID3Frame(const char *name, const char *data) { struct id3_frame *frame; id3_latin1_t *latin1; id3_ucs4_t *ucs4;
frame = id3_frame_new(name);
latin1 = data; ucs4 = malloc((id3_latin1_length(latin1) + 1) * sizeof(*ucs4)); if (ucs4) { id3_latin1_decode(latin1, ucs4); id3_field_setstrings(&frame->fields[1], 1, &ucs4); free(ucs4); }
return frame; }
-- Rob Leslie rob@mars.org