Page 1 of 1

VS1003 Start playback from a specific moment

Posted: Sat 2018-12-22 13:20
by kmiha
Is there a register that I can access to know what moment of the song is playing right now?
I want to have the following function:
While playing a song there is a need for announcement. So, the song must be paused, then the announcement must be played, and then the song must be continued, from the moment that has been paused.

Merry Christmas !!!

Re: VS1003 Start playback from a specific moment

Posted: Fri 2018-12-28 11:43
by pasi
In a system with a microcontroller you know the file position of the audio you are sending. There is also SCI_DECODETIME which tells the location in seconds.

If you use mp3 format, it is easy to continue playing from a new location - send enough zeroes to make sure the previous frame is flushed, then start sending from the new file. The same can be used when you continue playing the file.

For other formats you need to perform the proper cancel (or software reset) sequences.