added support to write audio file by providing audio buffer list