I found a library that helps to convert WAV file to Flac: https://github.com/jhurt/wav_to_flac
Also succeed to compile Flac to the platform and it works fine.
I\
can't you record your audio in wav using audio queue services and process output packets with your lib ?
edit from apple dev doc : "Applications writing AIFF and WAV files must either update the data header’s size field at the end of recording—which can result in an unusable file if recording is interrupted before the header is finalized—or they must update the size field after recording each packet of data, which is inefficient."
apparently it seems quite hard to encode a wav file on the fly