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/WavpackDecoderPlugin.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/decoder/plugins/WavpackDecoderPlugin.cxx') diff --git a/src/decoder/plugins/WavpackDecoderPlugin.cxx b/src/decoder/plugins/WavpackDecoderPlugin.cxx index 870a1a80d..1efd49850 100644 --- a/src/decoder/plugins/WavpackDecoderPlugin.cxx +++ b/src/decoder/plugins/WavpackDecoderPlugin.cxx @@ -160,8 +160,9 @@ wavpack_decode(Decoder &decoder, WavpackContext *wpc, bool can_seek) ? format_samples_float : format_samples_int; - const float total_time = float(WavpackGetNumSamples(wpc)) - / audio_format.sample_rate; + const auto total_time = + SongTime::FromScale(WavpackGetNumSamples(wpc), + audio_format.sample_rate); const int bytes_per_sample = WavpackGetBytesPerSample(wpc); const int output_sample_size = audio_format.GetFrameSize(); -- cgit v1.2.3