More libFLAC work and memory leak fix for closing audio sources