aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/DsfDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-29 20:52:39 +0200
committerMax Kellermann <max@duempel.org>2014-08-29 21:40:15 +0200
commitd9d97bd17bf0d9469dcf00120d3d3fdab87299bc (patch)
treed7abd9d0cbc6e417aaf4427740bf47207f47d7fa /src/decoder/plugins/DsfDecoderPlugin.cxx
parent94f6380d693b8bece655885d37495a3a73c78b62 (diff)
downloadmpd-d9d97bd17bf0d9469dcf00120d3d3fdab87299bc.tar.gz
mpd-d9d97bd17bf0d9469dcf00120d3d3fdab87299bc.tar.xz
mpd-d9d97bd17bf0d9469dcf00120d3d3fdab87299bc.zip
DecoderAPI: pass SignedSongTime to decoder_initialized()
Diffstat (limited to 'src/decoder/plugins/DsfDecoderPlugin.cxx')
-rw-r--r--src/decoder/plugins/DsfDecoderPlugin.cxx4
1 files changed, 2 insertions, 2 deletions
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<uint64_t>(n_blocks * DSF_BLOCK_SIZE,
+ audio_format.sample_rate);
/* success: file was recognized */
decoder_initialized(decoder, audio_format, is.IsSeekable(), songtime);