VS1003 Start playback from a specific moment

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
Post Reply
kmiha
User
Posts: 3
Joined: Thu 2018-04-05 16:06

VS1003 Start playback from a specific moment

Post by kmiha » Sat 2018-12-22 13:20

Hi,
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 !!!

User avatar
pasi
VLSI Staff
Posts: 1585
Joined: Thu 2010-07-15 16:04

Re: VS1003 Start playback from a specific moment

Post by pasi » Fri 2018-12-28 11:43

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.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Post Reply