summaryrefslogtreecommitdiff
path: root/playlist.h
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-10-11 17:14:10 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-10-11 17:14:10 +0200
commit4326a465afb45622d22d2dd52fe6f4d25f1a17ef (patch)
treec9480b530aa077ab43f5bc9a3940eda556accb03 /playlist.h
parent9425bbc1716081cff72c73744a4fc82251b9db41 (diff)
added total playtime display to statusbar
Diffstat (limited to 'playlist.h')
-rw-r--r--playlist.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/playlist.h b/playlist.h
index 1191f9db..6f297e41 100644
--- a/playlist.h
+++ b/playlist.h
@@ -37,7 +37,6 @@ typedef struct playItem_s {
int tracknum; // used for stuff like sid, nsf, cue (will be ignored by most codecs)
int startsample;
int endsample;
- float duration; // in seconds
int shufflerating; // sort order for shuffle mode
float playtime; // total playtime
time_t started_timestamp; // result of calling time(NULL)
@@ -46,6 +45,8 @@ typedef struct playItem_s {
float replaygain_album_peak;
float replaygain_track_gain;
float replaygain_track_peak;
+ // private area, must not be visible to plugins
+ float _duration; // in seconds
struct playItem_s *next[PL_MAX_ITERATORS]; // next item in linked list
struct playItem_s *prev[PL_MAX_ITERATORS]; // prev item in linked list
struct metaInfo_s *meta; // linked list storing metainfo
@@ -58,6 +59,7 @@ extern playItem_t *playlist_tail[PL_MAX_ITERATORS]; // tail of linked list
extern playItem_t *playlist_current_ptr; // pointer to a real current playlist item (or NULL)
extern int pl_count;
+extern float pl_totaltime;
int
pl_add_dir (const char *dirname, int (*cb)(playItem_t *it, void *data), void *user_data);
@@ -161,4 +163,10 @@ pl_select_all (void);
void
pl_reshuffle (playItem_t **ppmin, playItem_t **ppmax);
+// required to calculate total playtime
+void
+pl_set_item_duration (playItem_t *it, float duration);
+
+float
+pl_get_item_duration (playItem_t *it);
#endif // __PLAYLIST_H