play: add current and total time of music
Signed-off-by: Mahyar Koshkouei <mk@deltabeard.com>
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user