Determine the duration of an mp3 file #1529
-
Hi, is there any way to determine the duration in seconds of an mp3 file using this library? Also, I would be grateful if you could help me with checking how much time is left to the end of a playing file. I am building A2DP audio player which streams mp3 files and this information would be really helpful for me. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
For the first question: google is your friend! For the second: just read the actual file position and compare it with the total file size |
Beta Was this translation helpful? Give feedback.
-
The AudioPlayer provides you a pointer to the actual stream.: In your case this is a pointer to a File, so you can just cast it to (File*). |
Beta Was this translation helpful? Give feedback.
-
It should be |
Beta Was this translation helpful? Give feedback.
For the first question: google is your friend!
For the second: just read the actual file position and compare it with the total file size