-2

hi all i am extracting metadata of an audio file using Taglib library . i am getting many fields properly but not able to extract name of source device by which the audio file has been created. Please suggest any way to get out of it. Code used is as below

 MetaData md;

    const char * filename = file.c_str();
    std::cout<< filename;

    FileRef f((FileName(filename))); 

    md.filepath = file;
   //if(f.isNull()) return md;
   // if(!f.tag()) return md;
   // if(f.tag()->isEmpty()) return md;

    string artist = f.tag()->artist().toCString();
    string album = f.tag()->album().toCString();
    string title = f.tag()->title().toCString();//.to8Bit(true);
    uint year = f.tag()->year();
    uint track = f.tag()->track();
    int bitrate = f.audioProperties()->bitrate();
    string comment=f.tag()->comment().toCString();
    string genre =f.tag()->genre().toCString();
    // length in second  
    int lenght=f.file()->audioProperties()->length();

    int channel = f.file()->audioProperties()->channels();
    string name =f.file()->name();
    int sampleRate=f.audioProperties()->sampleRate();
Luky
  • 5
  • 5
  • We don't know what your code looks like. – Austin Henley Jul 08 '13 at 05:54
  • MetaData md; const char * filename = file.c_str(); std::cout<< filename; FileRef f((FileName(filename))); md.filepath = file; //if(f.isNull()) return md; // if(!f.tag()) return md; // if(f.tag()->isEmpty()) return md; string artist = f.tag()->artist().toCString(); string album = f.tag()->album().toCString(); string title = f.tag()->title().toCString() – Luky Jul 10 '13 at 08:06
  • Edit your question and place the code there, with correct formatting. – Austin Henley Jul 10 '13 at 13:44
  • @AustinHenley Couldyou please help me now ?? i am looking for the device name ?? thanks in advance – Luky Jul 15 '13 at 06:44
  • I am still searching for your kind response ?? Nobody is even looking on the post :( – Luky Jul 15 '13 at 08:51

1 Answers1

0

What exactly do you mean with "name of source device by which the audio file has been created"? Are you looking for the name of the person or organisation that encoded the audio file, normally saved in the TENC tag?

Could you give us an example, what you want to see?

PeterCo
  • 910
  • 2
  • 20
  • 36