FLAC works fine in MKV, but unfortunately you cant use FLAC.acm for that. This ACM codec was only ment to allow
Decoding of FLAC streams in MKV, not
Encoding, as FLAC is VBR ( Variable Bitrate ) by default and this is incompatible with the outdated ACM codec API.
To create MKV files with FLAC audio, you have 2 choices :
1. use
mkvmerge and mux your video.avi and your audio.flac into a MKV. For playback, you need the FLAC decoder DShow filter installed
2. create an encoding graph in Graphedit, using the FLAC encoder Dshow filter from an AVI containing the video and a WAV audio, and matroska muxer plus file writer to save the final file