diff options
author | Max Kellermann <max@duempel.org> | 2014-08-29 20:52:39 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-29 21:40:15 +0200 |
commit | d9d97bd17bf0d9469dcf00120d3d3fdab87299bc (patch) | |
tree | d7abd9d0cbc6e417aaf4427740bf47207f47d7fa /src/decoder/plugins/WavpackDecoderPlugin.cxx | |
parent | 94f6380d693b8bece655885d37495a3a73c78b62 (diff) | |
download | mpd-d9d97bd17bf0d9469dcf00120d3d3fdab87299bc.tar.gz mpd-d9d97bd17bf0d9469dcf00120d3d3fdab87299bc.tar.xz mpd-d9d97bd17bf0d9469dcf00120d3d3fdab87299bc.zip |
DecoderAPI: pass SignedSongTime to decoder_initialized()
Diffstat (limited to 'src/decoder/plugins/WavpackDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/plugins/WavpackDecoderPlugin.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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<uint64_t>(WavpackGetNumSamples(wpc), + audio_format.sample_rate); const int bytes_per_sample = WavpackGetBytesPerSample(wpc); const int output_sample_size = audio_format.GetFrameSize(); |