FLAC’s total-sample field counts interchannel samples: the count applies to every channel at once. Duration is that count divided by sample rate, not multiplied by the number of channels. A stereo file and a six-channel file can have the same sample count and duration while storing different numbers of individual sample values.
Work through a duration
Imagine STREAMINFO declares 96,000 total interchannel samples at 48,000 Hz. The duration is two seconds. For stereo, there are two channels with 96,000 values each; for six channels, there are six such sets. Channel count changes the collection of sample values, rather than making the presentation last four or twelve seconds.
Handle an unknown count deliberately
RFC 9639 gives zero a special meaning in the total-sample field: the total is unknown. A duration display should not automatically interpret that as a demonstrated empty audio track. The decoder can still need to inspect the stream under the format rules. A metadata summary and the actual presence of audio frames are separate observations to preserve in a support report.
Keep byte calculations separate
Decoded PCM byte size additionally needs channel count and the sample storage representation. Encoded FLAC file size also depends on compression and metadata. Dividing the complete file bytes by an assumed constant PCM rate does not accurately recover the declared media duration. Retain the exact field used by the calculation so a reviewer can distinguish sample arithmetic from a rough byte-size estimate.
Check the practical discrepancy
If a tool reports twice the expected length for a stereo stream, a maintainer can inspect whether it multiplied the interchannel count again. If the declared total disagrees with decoded frame coverage, investigate that discrepancy separately rather than overwrite the count without verification. Viewers can report the displayed timer and audible ending. The useful outcome is a correctly defined duration calculation, with unknown metadata, inconsistent declarations and actual missing audio kept as different cases requiring their own evidence.

