Phase difference between two wave files
You need to cross-correlate those two wavfiles : from wikipedia "cross-correlation is a measure of similarity of two series as a function of the displacement of one relative to the other" 

The result obtained will give you a measure of the similarity between those two audio signals depending on the time. 

Therefore you will need to find the time for which the cross-correlation is at its maximum (ie : maximum similarity), it will indicates you the time delay, phase between those two signals. 

A couple of advices : 

1/ If your signals are periodic, you only need to compute cross-correlation over one period (or more if you want to average the noise). 

2/ Don't forget to take the absolute value of the cross-correlation while searching for the maximum.