Is there any simple algorithm to convert a sound source in 3d to volume and panning I'm looking for a simple algorithm which calculates an approximation of volume and pan at the position of the camera from the following 3d data:


Camera (position and look direction)
An item which emits mono-audio at a specific position.


Just a basic approximation is enough for this case.
inverse-square law for distance.  and Blumlein stereo for pan.