The following Matlab project contains the source code and Matlab examples used for flacwrite write out a flac encoded audio file using flac.
If you have a flac binary, and also the popenw mex extension, this routine allows you to write flac (free lossless audio coder)-format files as a drop-in replacement for wavwrite, accepting all the same syntax.