Audio distortion when split with FLAC

Reproduced. There appears to be an issue with FLAC reading. FLAC writing seems to be fine.

Test methodology (21.06.29 on Linux Mint):

  1. 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.

  2. 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.

  3. 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: