Since I\'ve posted this question, I\'ve been trying to write a valid WAV file myself from raw PCM data. I\'ve managed to write the FLAC converter (tested and works), but it
Error codes returned by snd_* functions are negative.
There are functions that can return a positive value to indicate success (e.g., snd_pcm_readi returns the number of frames).