diff options
Diffstat (limited to 'src/decoder/plugins/WildmidiDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/plugins/WildmidiDecoderPlugin.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/decoder/plugins/WildmidiDecoderPlugin.cxx b/src/decoder/plugins/WildmidiDecoderPlugin.cxx index 08078a792..221f7433b 100644 --- a/src/decoder/plugins/WildmidiDecoderPlugin.cxx +++ b/src/decoder/plugins/WildmidiDecoderPlugin.cxx @@ -86,8 +86,11 @@ wildmidi_file_decode(Decoder &decoder, Path path_fs) return; } - decoder_initialized(decoder, audio_format, true, - info->approx_total_samples / WILDMIDI_SAMPLE_RATE); + const auto duration = + SongTime::FromScale<uint64_t>(info->approx_total_samples, + WILDMIDI_SAMPLE_RATE); + + decoder_initialized(decoder, audio_format, true, duration); DecoderCommand cmd; do { |