Tag: use SignedSongTime for the song duration

This commit is contained in:
Max Kellermann
2014-08-29 12:14:27 +02:00
parent 8ce30c6a69
commit 7c25d83f1c
25 changed files with 103 additions and 84 deletions

View File

@@ -155,10 +155,13 @@ Client::AllowFile(gcc_unused Path path_fs, gcc_unused Error &error) const
static std::string
ToString(const Tag &tag)
{
char buffer[64];
sprintf(buffer, "%d", tag.time);
std::string result;
std::string result = buffer;
if (!tag.duration.IsNegative()) {
char buffer[64];
sprintf(buffer, "%d", tag.duration.ToMS());
result.append(buffer);
}
for (const auto &item : tag) {
result.push_back('|');