Wave File Write

How can i  Collect Data From ADC and Write as Wave File ? Any Example