Fix incorrect track lengths
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user