play: add current and total time of music

Signed-off-by: Mahyar Koshkouei <mk@deltabeard.com>
This commit is contained in:
Mahyar Koshkouei
2023-07-08 16:05:21 +01:00
parent ca583a5487
commit cdf49f8dcf
8 changed files with 142 additions and 30 deletions

View File

@@ -35,15 +35,6 @@ struct dirList_t
char* currentDir;
};
/**
* Allows the playback thread to return any error messages that it may
* encounter.
*
* \param infoIn Struct containing addresses of the event, the error code,
* and an optional error string.
*/
void playbackWatchdog(void* infoIn);
/**
* Get number of files in current working folder
*

View File

@@ -43,12 +43,23 @@ struct decoder_fn
* Free codec resources.
*/
void (* exit)(void);
/**
* Optional. Set to NULL if unavailable.
* Get number of samples in audio file.
*/
size_t (* getFileSamples)(void);
};
struct playbackInfo_t
{
char* file;
struct errInfo_t* errInfo;
char *file;
struct errInfo_t *errInfo;
/* If 0, then the duration of file is unavailable. */
size_t samples_total;
size_t samples_played;
size_t samples_per_second;
};
/**