On Sunday, April 14, 2002, at 01:51 AM, Dominic Mazzoni wrote:
I couldn't get the "comment" tag to work. I tried to import "comment" from files that I know have valid ID3V1 comments, and got nothing, and I tried to export both ID3V1 and ID3V2 comments and nothing got written.
All of the other standard tags I tried worked. Have you seen this problem before? Can you reproduce it?
Comment frames ("COMM") are not like the other text frames; they have a different structure. See section 4.10 of the ID3v2.4.0 native frames document for details, but in brief: there are four fields. The fourth field is the actual comment text. The third field is a short content description (e.g. "ID3v1 Comment" -- or just leave it empty). The second field is a 3-byte language identifier (which you can ignore if the language is unknown), and the first field is the text encoding.
There can be more than one comment frame in an ID3v2 tag, but only one with the same language and content description. When writing ID3v1 tags, libid3tag writes the first comment frame only.
To keep things simple, Audacity provides the user with a choice control to set the genre - i.e. they can't type in their own. This keeps the dialog box compatible with both ID3V1 and ID3V2.
It would be nice if libid3tag made it easier to work with genres by number. Currently I'm using the id3_genre_name function in a rather roundabout way - when I want to retrieve the 29th genre name, I sprintf 29 to a string, convert it to a ucs4 string, then pass that to id3_genre_name.
All I want is for you to export two functions: one which returns the number of genres, and another which returns the nth genre.
Yes, this is something I was planning to add. Instead of two functions, I was only going to add one which returned a null pointer after the last valid genre number.
I discovered that if I try to output a genre name to an ID3V1 file, nothing gets written. However, if I output a genre number (i.e. the string "29") it works.
For symmetry, it seems that if I try to write a genre name which is in the list, libid3tag should write out the appropriate index number to the ID3V1 tag.
This is a reasonable expectation. I'll see if I can get the next release to behave this way.
Thanks for your feedback,
-- Rob Leslie rob@mars.org