This project has moved. For the latest updates, please go here.

Getting Total time of file

Oct 2, 2016 at 4:33 PM
My application has a list of available files that it can play according to a sequence or a user may manually select and play files. I would like to have the UI show the total playing time for each file and so far the only way I can see to get this is to create a wave provider object, get the Total Time property, and then dispose of the wave provider.

I guess I could keep the wave provider open ready for the user to play it, however there could be many files in a set and this seems overly resource wasteful.

Any other ways of getting this total file time?
Oct 2, 2016 at 7:12 PM
You could use WinAPi Codepack Shell to request the duration detected by windows