mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

An audio file can only play sound between two PCM samples (the 'start' and 'end' of section of a wave form). Therefore when calculating duration from a count of PCM samples we need to subtract one first (the 'end' sample which has no duration of its own). This only changes durations by one PCM sample (21us - 22us for 44.1kHz sample rate). PiperOrigin-RevId: 596990306