aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag/TagHandler.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-29 22:43:36 +0200
committerMax Kellermann <max@duempel.org>2014-08-29 22:52:04 +0200
commit3158955198fbdc71319cd3418523d851e6d47106 (patch)
treeab3fff73fe7efa73ed95f9998eec5da66947b4e2 /src/tag/TagHandler.hxx
parentd9d97bd17bf0d9469dcf00120d3d3fdab87299bc (diff)
downloadmpd-3158955198fbdc71319cd3418523d851e6d47106.tar.gz
mpd-3158955198fbdc71319cd3418523d851e6d47106.tar.xz
mpd-3158955198fbdc71319cd3418523d851e6d47106.zip
TagHandler: pass SongTime to duration()
Diffstat (limited to '')
-rw-r--r--src/tag/TagHandler.hxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tag/TagHandler.hxx b/src/tag/TagHandler.hxx
index 6f737bf56..c12b605bc 100644
--- a/src/tag/TagHandler.hxx
+++ b/src/tag/TagHandler.hxx
@@ -22,6 +22,7 @@
#include "check.h"
#include "TagType.h"
+#include "Chrono.hxx"
#include <assert.h>
@@ -30,11 +31,11 @@
*/
struct tag_handler {
/**
- * Declare the duration of a song, in seconds. Do not call
+ * Declare the duration of a song. Do not call
* this when the duration could not be determined, because
* there is no magic value for "unknown duration".
*/
- void (*duration)(unsigned seconds, void *ctx);
+ void (*duration)(SongTime duration, void *ctx);
/**
* A tag has been read.
@@ -53,12 +54,12 @@ struct tag_handler {
static inline void
tag_handler_invoke_duration(const struct tag_handler *handler, void *ctx,
- unsigned seconds)
+ SongTime duration)
{
assert(handler != nullptr);
if (handler->duration != nullptr)
- handler->duration(seconds, ctx);
+ handler->duration(duration, ctx);
}
static inline void