tags:

views:

75

answers:

0
+1  Q: 

ID3LIB SONGLEN

People,

I'm working on an new application to Tag MP3-Files. Therefore I use the ID3LIB (Version 3.8.3). Now everything works fine except the SONGLEN. From other taggers i know that my mp3-file has a songlen but everytime i search for the SONGLEN-frame i dont get a frame!

Does someone know where my mistake is?

here the Code:

Call:

if (getTag(myTag, ID3FID_SONGLEN,  val)) cout << "asdf" << val.toStdString()<< endl;

Function:

bool MP3File::getTag(ID3_Tag &tag, ID3_FrameID frameid, QString &result){
static char buffer[1024];
ID3_Frame *frame;
ID3_Field *field;
if ((frame = tag.Find(frameid))) {
field = frame->GetField(ID3FN_TEXT);
if (field)
if (field->Get (buffer, sizeof buffer) > 0) {
result=(QString)buffer;
tag.RemoveFrame(frame);
return true;
}
}
return false;
}

thanks for the help Mastershybby