This project has moved and is read-only. For the latest updates, please go here.

Not determined .flac duration

Jan 21 at 9:41 AM
Edited Jan 21 at 9:43 AM
Hello!. Use your library to determine the duration of .flac files. Fail What I had not opened, it shows the duration = 0. On the other formats do not have problems. What could be the reason?

for example, I do so
IAudioDataReader theReader = ATL.AudioReaders.AudioReaderFactory.GetInstance().GetDataReader(@"C:\music\1.flac");

theReader.ReadFromFile(@"C:\music\1.flac");

labelDuration.Text += theReader.Duration.ToString();
Feb 13 at 3:49 PM
Edited Feb 13 at 3:49 PM
Hello Tideus,


First of all, sorry for the late reply.

The code you posted looks correct. It might be that the FLAC file you're using has a specific format/encoding unknown to the library.

=> There are 2 ways to solve this

1/ Run the library in debug mode, take a look at the output and send me the log/exception messages on this thread

2/ PM me a link to your FLAC file (via any online sharing platform, e.g. MEGA) and I'll get back to you quickly


Looking forward to hearing from you,

Cheers

-Z440
Feb 16 at 8:17 AM
Hello Tideus,


Latest update (fd023c757859) might solve your issue. FLAC reader was a tad extreme when dealing with unknown tag IDs, marking the whole file as invalid. It has now been fixed.

Please update your code from the master branch and let me know.


Cheers,

-Z440
Marked as answer by Tideus on 2/16/2017 at 11:40 AM
Feb 16 at 7:45 PM
Zeugma440, Thank you very much, now it works))