Music playback progress by percentage #630
-
Hi, Phill: I'm trying to make a mp3 player and for some reason I can not use audioPlayer class. I then start with I have to determine playback is finished and playback progress. In StreamCopy class I found a callback My question is: Is this a right(normal) way, and is there a better way to do progress thing? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Currently there is no such functionality, but I suggest that you contribute to this project by extending it. I think the cleanest way would be to provide a new class e.g. ProgressStream() where you implement the following methods:
Maybe you have a look at the existing MeasuringStream class which calculating the bytes per second... Of cause you can easily do this calculation in the loop by just calculating the percentage using file.position() and file.size() and there is no need for a callback. |
Beta Was this translation helpful? Give feedback.
-
I do think i'm not good enough to do this, maybe I can do some testing stuff, sorry about that. |
Beta Was this translation helpful? Give feedback.
-
Have a look at https://pschatzmann.github.io/arduino-audio-tools/classaudio__tools_1_1_progress_stream.html |
Beta Was this translation helpful? Give feedback.
-
Wow! What a speed! Thank you! |
Beta Was this translation helpful? Give feedback.
Currently there is no such functionality, but I suggest that you contribute to this project by extending it.
I think the cleanest way would be to provide a new class e.g. ProgressStream() where you implement the following methods:
Maybe you have a look at the existing Measuring…