From d9d97bd17bf0d9469dcf00120d3d3fdab87299bc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2014 20:52:39 +0200 Subject: DecoderAPI: pass SignedSongTime to decoder_initialized() --- src/decoder/plugins/DsfDecoderPlugin.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/decoder/plugins/DsfDecoderPlugin.cxx') diff --git a/src/decoder/plugins/DsfDecoderPlugin.cxx b/src/decoder/plugins/DsfDecoderPlugin.cxx index c92c276fc..b84eadf66 100644 --- a/src/decoder/plugins/DsfDecoderPlugin.cxx +++ b/src/decoder/plugins/DsfDecoderPlugin.cxx @@ -318,8 +318,8 @@ dsf_stream_decode(Decoder &decoder, InputStream &is) } /* Calculate song time from DSD chunk size and sample frequency */ const auto n_blocks = metadata.n_blocks; - float songtime = float(n_blocks * DSF_BLOCK_BITS) / - (float) metadata.sample_rate; + auto songtime = SongTime::FromScale(n_blocks * DSF_BLOCK_SIZE, + audio_format.sample_rate); /* success: file was recognized */ decoder_initialized(decoder, audio_format, is.IsSeekable(), songtime); -- cgit v1.2.3