On Thu, Apr 11, 2002 at 12:50:07AM -0700, Rob Leslie wrote:
Your ::ExportID3() looks good; try the following MakeID3Frame() instead:
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,
id3_frame_new and id3_latin1_decode don't seem to be in the public id3lib.h. At least not in 0.14.2b-2.
Also, I was wondering if you could allow access to the array of genres. This is useful for writing id3 editors that want to offer the user a list of available genres.
I am implementing the tag editor for my xmms plugin which (BTW) now matched the mpglib based one feature for feature (almost ;)
cheers sam