For Above Wave Format only,Simply i replaced the
byte[] buffer = new byte[sourceProvider.WaveFormat.AverageBytesPerSecond * 4] by
byte[] buffer = new byte[sourceProvider.WaveFormat.BlockAlign* 4]
i traced NaudioDemo code,in same way my code is going. i guess everything is going in write way.But not getting why Encoded File is not able to play.