How do I convert a TTA file and its CUE sheet into several FLAC files?

view story

http://unix.stackexchange.com – I have a sound file encoded in TTA format and a CUE sheet with its metadata. Which tools and commands do I need to convert it and split it into several FLAC files? I tried using ffmpeg to convert the TTA file into a FLAC but it shows a "CRC error" and the resulting file has the wrong duration. The TTA file itself plays fine in VLC. (HowTos)