# How is loop information encoded in FLAC files?

I'm trying to convert .wav files (samples for a sampled instrument) into FLAC format. The .wav files have loop information in the smpl chunk. I understand that various sample players support loops in FLAC files. However, I can't find a converter that converts .wav to .flac and preserves the loop information. I could code it myself (say, by postprocessing results from SoX), but can't find any information on how loops are encoded in FLAC files.

I'm using this for sampled instruments with hundreds of .wav files and so need to be able to do batch processing.

Sorry if this is the wrong forum. It's not quite stackoverflow or sounddesign.

• The information is in the flac file format specifications. Look up seekpoints or cues based on what suits better for your purpose. – Justme Apr 24 '20 at 4:59

Better yet, the flac application has a --keep-foreign-metadata option that does the trick without my having to code anything.