Flies use the surface area of their wings to capture vibrations in the air which then reach a tympanum next to the base of their wings. This tympanum functions in a very similar way to the human ear drum to interpret the sounds. No wonder flies are so tough to swat!