Yeah, I realise that its difficult, and I wouldn't expect anything I come up with to be perfect.

Thinking about it more, 2 microphones wont do the trick. I think with 3 microphones in a triangle and a bit of creative code it would be possible to make something that could crudely pinpoint the directions of loud noises.