summaryrefslogtreecommitdiff
path: root/src/player
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-09-21 19:32:35 +0200
committerMax Kellermann <max@musicpd.org>2018-09-21 20:51:08 +0200
commitd3d1d37782952e9b1142a4735635aac3dd2db466 (patch)
tree24d16576ff0a361b7d55525a644d9d071ef3d411 /src/player
parent1a2012a97e993869914a224d1603fdafcf3f9d3b (diff)
AudioFormat: add TimeToSize(), SizeToTime()
Diffstat (limited to 'src/player')
-rw-r--r--src/player/Thread.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx
index 9be121cb7..9c8af5e90 100644
--- a/src/player/Thread.cxx
+++ b/src/player/Thread.cxx
@@ -766,7 +766,7 @@ PlayerControl::PlayChunk(DetachedSong &song, MusicChunkPtr chunk,
const double chunk_length(chunk->length);
outputs.Play(std::move(chunk));
- total_play_time += FloatDuration(chunk_length / format.GetTimeToSize());
+ total_play_time += format.SizeToTime<decltype(total_play_time)>(chunk_length);
}
inline bool