-
Notifications
You must be signed in to change notification settings - Fork 391
Description
Hi Wolle,
Previously I had some problems with positioning in an MP3 file on the SD-Card player (see issue #748). In the mean time, your audio library has evolved for nearly two years, so I decided to upgrade the library to the latest version 3.4.4d. The mechanisms to position in the track have significantly changed, but I guess using:
bool connecttoFS(fs::FS& fs, const char* path, int32_t fileStartTime = -1);
and:
bool setAudioPlayTime(uint16_t sec);
should do the job.
When powering down my player, the current track file name and position (using getAudioCurrentTime) are saved. When powering up again, the track should resume at the saved position. I use:
connecttoFS(SD_MMC, saved_track_name, saved_track_time);
This works for the audio position of track (I tested with your test file "seconds-CBR.mp3"). However, when I call getAudioCurrentTime(), the time is still at the beginning of the track. Could you please take a look on this behavior?
In addition, during operation, I have the possibility to position to a new time, using setAudioPlayTime. This works fine, and contrary to connecttoFS, the current position is also updated correctly. However, setAudioPlayTime works only if the track is running. Is there a particular reason for this? In my application, I pause the player, so the user can select a new time. I commented out the line "if (!m_f_running) return false;" in setAudioPlayTime, and it seems to work properly.
Regards,
Otto