I am currently moving my C # application to Qt / C ++. I have problems with TagLib tags. It seemed strange to me that TagLib # returns the duration of sound in milliseconds, and TagLib returns its (incorrect) durations in seconds. TagLib simply returns zero for length values, and TagLib # remains true.
Here is my source in C # / TagLib # ...
TagLib.File tagfile = TagLib.File.Create(path);
uint milliseconds = (uint)tagfile.Properties.Duration.TotalMilliseconds;
And here is what should be almost equivalent in C ++ / TagLib. I even made him read for sure. No success.
TagLib::FileName fn(path);
TagLib::FileRef fr(fn, true, TagLib::AudioProperties::Accurate);
uint length = fr.audioProperties()->length();
It works as expected for most of my media files. However, the selected multiple audio files cannot return any sound properties (the rest of the tag information is read perfectly!). The same sound properties are returned without problems in TagLib #.
Any ideas are welcome. Thank.
Anyone have any ideas before the grandeur ends?
source
share