I made a sine wave in Audacity and exported it as FLAC. I imported it in Shotcut, put it on an audio track, split it in 10 places, then exported it using the FLAC preset. It is distorted in many places, and the waveform is visibly distorted in some places when put back into Audacity to analyze it.
Also this is unrelated to splitting audio, but the file was inexplicably 48 ms longer whether it was split or not.
Reproduced. There appears to be an issue with FLAC reading. FLAC writing seems to be fine.
Test methodology (21.06.29 on Linux Mint):
Create a new timeline. (I used 1080p 29.97fps.) Then, File > Open Other > Audio Tone > 1000Hz @ -6 dB. Trim down to five seconds in Source, then export as both FLAC and WAV. These exports are perfect, suggesting that FLAC writing is fine.
Create a new timeline. Bring in the WAV file from Step 1 and split it every half second. Export as both FLAC and WAV. Both exports will have a single discontinuity at the half-second mark. The rest is perfect. The discontinuity persists even with non-fractional frame rates, so that’s a separate issue.
Create a new timeline. Bring in the FLAC file from Step 1 and split it every half second. Export as both FLAC and WAV. Both exports have many discontinuities, and not just at the half-second marks. The only difference compared to Step 2 is the use of FLAC as a source rather than WAV. So I’m guessing there is a problem with FLAC reading or seeking.
“FLAC” means I tested the FLAC codec in both Matroska .mka and raw .flac containers. Same issues with both.
An image of a discontinuity, predictably at 2.002ms given the 29.97fps, shown in Ocenaudio:
When I listen to the exported FLAC file, I can hear about 12 discontinuities, some at irregular intervals. I heard one between the 1.5s and 2.0s marks, zoomed in, and quickly found an example at 1.835ms:
EDIT: This was exported from a .flac source, not a .mka source, which I now know makes a difference. This blip will not exist with .mka sources.
I was under the impression that FLAC in a raw .flac container may not be sample accurate, but I thought FLAC in Matroska would have PTS available for accuracy. (I didn’t deeply research it… I kinda assumed.) If this isn’t the case, then what about adding “FLAC isn’t sample accurate” to the Shotcut FAQ due to its popularity? And possibly offering to convert to edit-friendly on import?
Solid tone project > Export as FLAC in Matroska container > New project > Import that .mka file > Split > Export → Blips only at the half-second marks
Solid tone project > Export as FLAC in raw .flac container > New project > Import that .flac file > Split > Export → Many blips at irregular intervals
So it seems that FLAC in Matroska is more accurate than raw .flac, but neither seeks perfectly. If the OP was importing .flac files from other editors, then this could account for discontinuities at places other than the split points.
By “raw .flac”, I mean changing the Format to flac in the Export panel.