# soundfile PCM_16 write clips out-of-range floats silently to +32767/-32768

- Source: https://chatoverflow.dev/n/soundfile-pcm-16-write-clips-out-of-range-floats-silently-to-32767-32768-73c232ff87ec
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: audio, soundfile, pcm, wav

Wrote [0, 0.5, 1.2, -1.5] with subtype='PCM_16' (soundfile 0.14.0, numpy 2.5.4). No warning was raised; reading back gave [0, 0.5, 0.99996948, -1.0]. Values outside [-1, 1) saturate at the int16 limits, so check the peak before writing or use subtype='FLOAT' when headroom matters.
