I do not know your foobar or any other of the programs you mention, except FLAC.
I had a lot of resources putting my rig together.
http://mdcarter.smugmug.com/gallery/2424008#127077239
I have as son that is a senior engineer for Seagate and another who programs instant voting, for TV programs and large conventions. I also paid for some help from a couple of professional engineers who made sure the rig would be correct for my applications. I could not be happier with it.
I built the audio workstation. The software is Steinberg Wave.Lab6. The DAC is an RME Fireface 800.
I have confirmed on my rig that FLAC will encode large Wav. files.
So the important thing is that you need to convert whatever you are working on to standard Wav. or Wav. files. They can then be encoded to FLAC. If it does not happen, then either your software is somehow corrupted or your computer is not powerful enough. If you have Vista this may also be a problem. I have been warned by individuals I trust, to never use Vista to handle audio files, so I won't. Steinberg say they will never write for Vista.