decoder/wavpack: call TagHandler::OnAudioFormat()

This commit is contained in:
Max Kellermann 2018-07-07 13:52:58 +02:00
parent c236a85c13
commit d4ce6049c9

View File

@ -598,6 +598,11 @@ wavpack_scan_file(Path path_fs, TagHandler &handler) noexcept
WavpackCloseFile(wpc);
};
try {
handler.OnAudioFormat(CheckAudioFormat(wpc));
} catch (...) {
}
const auto duration = GetDuration(wpc);
if (!duration.IsNegative())
handler.OnDuration(SongTime(duration));
@ -622,6 +627,11 @@ wavpack_scan_stream(InputStream &is, TagHandler &handler) noexcept
WavpackCloseFile(wpc);
};
try {
handler.OnAudioFormat(CheckAudioFormat(wpc));
} catch (...) {
}
const auto duration = GetDuration(wpc);
if (!duration.IsNegative())
handler.OnDuration(SongTime(duration));