How to merge two audio buffer streams into single wav file?

Here we are using ASIO_SDK to read audio buffer from DVS (which is running as ASIO interface) and trying to save all those buffers into one single wav file with different audio streams based on number of channels.
Only one channel we will be able to save it but if we try for stereo, we were getting some lag in the audio.
If someone knows how to achieve this, please share with us.
Thank you in advance.