Adding ID3v2 tags to ripped Audio-CD's
#1
i have been using xbmc from the beginnning, but only recently have i tried the cd ripping feature.

after i had ripped a cd, i looked at its tags and found only the id3v1 tags had been written to the mp3 file.

as i like to have both sets of tags on my mp3s, i started to delve into the cd ripper code to see how hard it would be to add id3v2 tags aswell as the id3v1 tags.  in encoderlame.cpp i found this:

Quote:  // add id3v2 tags
 // id3tag_add_v2(pglobalflags);

so it appears someone else has had a look at adding id3v2 tags already.  but when i uncommented the code i found that the function was not one of those exported from lame_enc.dll by encoderdll.cpp.


i added the following to encoderdll.cpp:

Quote:void (__cdecl* p_id3tag_add_v2)(lame_global_flags* gfp);

Quote:void id3tag_add_v2(lame_global_flags* gfp)
 {
   p_id3tag_add_v2(gfp);
 }

Quote:dll.resolveexport("id3tag_add_v2", (void**) & p_id3tag_add_v2)

and then uncommented the function call in encoderlame.cpp, and changing its arguement from pglobalflags to m_pglobalflags.

i recompiled xbmc and ripped the cd again, but still only had the id3v1 tags.

i'm not sure if i did the dll export correct, but as it compiled, linked and didn't crash i assume it is correct.  i checked lame_enc.dll and it has id3tag_add_v2 listed as an export, so again i am assuming the function hasn't had its innards stripped out.

so has anyone else had any success trying this in the past as i am starting to wonder if this is reason why the function call was commented out, due to it not working?

i will have another look at it tonight, when i will also try exposing the id3tag_v2_only function and see if that allows me to get id3v2 tags.

jon
Reply

Logout Mark Read Team Forum Stats Members Help
Adding ID3v2 tags to ripped Audio-CD's0