This will never occur when capturing from (sane) audio interfaces, but may be a problem when capturing output of other apps or "what the user hears" (jack_capture launched without ports specified).
When converting from floats to ints, jack_capture should clamp levels to be between INT_MIN, INT_MAX.
How to reproduce:
launch JACK audio server
reduce audio interface volume to the minimum
jack_capture -c 2 -f flac
and in different terminal: ffmpeg -f lavfi -i sine=440,volume=9 -sample_rate 48000 -f f32le - | jack-stdin -e float system:playback_1
You should hear a slightly distorted sine wave (because JACK truncates properly). When you try to open the resulting FLAC file, strange things happen. Audacity will show clipping properly but Amplify effect will indicate that peak is +48dBFS (something impossible in integer FLAC file!). After applying -48dB gain noise can be heard in the distorted fragment.
flac --test jack_capture_01.flac checksum verification will fail.
This will never occur when capturing from (sane) audio interfaces, but may be a problem when capturing output of other apps or "what the user hears" (jack_capture launched without ports specified).
When converting from floats to ints, jack_capture should clamp levels to be between INT_MIN, INT_MAX.
How to reproduce:
jack_capture -c 2 -f flac
ffmpeg -f lavfi -i sine=440,volume=9 -sample_rate 48000 -f f32le - | jack-stdin -e float system:playback_1
You should hear a slightly distorted sine wave (because JACK truncates properly). When you try to open the resulting FLAC file, strange things happen. Audacity will show clipping properly but Amplify effect will indicate that peak is +48dBFS (something impossible in integer FLAC file!). After applying -48dB gain noise can be heard in the distorted fragment.
flac --test jack_capture_01.flac
checksum verification will fail.jack_capture version: 0.9.73 (Ubuntu 20.04)