And if two different sounds come wih slightly different time, from 2 different locations?

You have to identify the sounds first. If they are tha same, then try to locate them. But in my opinion this is not so easy. Humans can detect the direction in any of the x-y-z axis because of the ear construction and not only of time difference. It is more complicated than it sounds! Literally!

Ioannis