added dhplay, added debug functions, added wavfile support