https://github.com/xmos/lib_spdif/blob/9bfeff30d5cacf847af4ebb531109e2f46fc5096/lib_spdif/api/spdif.h#L106