A question about sound localization

...implies that you have code you haven't shown us. I'm sure it would be enormously helpful in showing what you are doing...