If you want to detect from where in a room a sound occur you will need to use a technique called triangulation. This will require optimally three microphones which you record calibrated with the same lag (or a known lag, or you won't be able to calculate the accurate position as in a small room as this occurs within a millisecond).
You then use the relation between the sample offset (the higher recording frequency, the more accurate result) in each of the sample to find the distance from each microphone, and the intersection will be the location.
If you only need a "sense" of position you can do with
one or (correction: with one you will need to already know the time of the event to calculate the distance, ie. the sound device records the synchronized time of its transmission, but this will probably not be the case here) two microphones. This will give you the distance to the microphone, but it is open in the circular plane (radius from the mic) from where the sound came from. If you have a directional sensitive mic you can get closer using the dB level, but you will not know if sound came from left or right, top or bottom.
With two microphone you can determine from where between the two mics the sound came from, but as with one, not from which side on the axis which cross the axis between the two mics.
As with decibel you will of course need to calibrate your inputs to a known sound at a known decibel (ie. a sinus based sound played at 0 dB). You will also need to define from where in the room it is 0 dB, a fixed distance from the mic, as a 0 dB sound is 0 dB one cm/inch from the mic as well as 1 m/foot from the mic.
Please note that the calculated position will be quantized relative to the quality of the recording equipment and recording frequency.
There is of course a technique called acoustic location, but then you are more in the field of sonars and radars - I assumed in my answer this is not what you're asking for.