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

@@ -119,7 +119,7 @@ song_print_info(Client &client, const DetachedSong &song, bool base)
tag_print_values(client, song.GetTag());
double duration = song.GetDuration();
if (duration >= 0)
client_printf(client, "Time: %u\n", unsigned(duration + 0.5));
const auto duration = song.GetDuration();
if (!duration.IsNegative())
client_printf(client, "Time: %u\n", duration.RoundS());
}