Fix incorrect track lengths

This commit is contained in:
jacqueline
2023-10-16 13:07:52 +11:00
parent f03093e5c2
commit 96ea6cef88
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ auto FoxenFlacDecoder::OpenStream(std::shared_ptr<IStream> input)
uint64_t num_samples = fx_flac_get_streaminfo(flac_, FLAC_KEY_N_SAMPLES);
if (num_samples > 0) {
format.total_samples = num_samples;
format.total_samples = num_samples * channels;
}
return format;
+1 -1
View File
@@ -121,7 +121,7 @@ auto TremorVorbisDecoder::OpenStream(std::shared_ptr<IStream> input)
auto l = ov_pcm_total(&vorbis_, -1);
std::optional<uint32_t> length;
if (l > 0) {
length = l;
length = l * info->channels;
}
return OutputFormat{