Uncompressed PCM has a fixed storage rate once sample rate, stored bits per sample, and channel count are known. AudioSize follows complete frames because a physical payload cannot contain a fraction of one interleaved frame. Duration is converted to frames first; only then are bytes calculated.
Find block alignment
Block alignment is channels multiplied by stored bits per sample divided by eight. Stereo 24-bit PCM therefore uses 2×24÷8=6 bytes per frame. This is stored container width, not a claim about analogue resolution, converter performance, noise floor, or audible quality.
Calculate byte rate
Multiply sample rate by block alignment. At 48,000 Hz, 24-bit stereo uses 48,000×6=288,000 bytes each second, or 2,304,000 bits per second. The result is deterministic for PCM and does not require an audio file, microphone, encoder, or network request.
Fit complete frames
For duration-to-size, AudioSize rounds the requested frame count upward so the payload covers at least the requested time. For storage-to-duration it rounds the frame count downward so the payload never exceeds capacity. The effective duration and any unused bytes remain visible instead of being hidden by a friendly decimal.
Keep the WAV boundary honest
A WAV or BWF file contains chunks in addition to sample data, and applications may add metadata or padding. AudioSize therefore labels its exact number PCM sample payload. Use the actual recorder or export application to confirm container overhead, maximum file size, automatic splitting, reserved storage, and sustained media speed.