Indicating a spatial location of a virtual sound source by determining an
output for each of one or more physical speakers as a function of an
orientation of corresponding virtual speakers that track the position and
orientation of a virtual listener relative to the virtual sound source in
a virtual environment or game simulation. A vector distance between the
virtual sound source and each virtual speaker is used to determine a
volume level for each corresponding physical speaker. Each virtual
speaker is specified at a fixed location on a unit sphere centered on the
virtual listener, and the virtual sound source is normalized to a virtual
position on the unit sphere. All computations are performed in Cartesian
coordinates. Preferably, each virtual speaker vector distance is used in
a nonlinear function to compute a volume attenuation factor for the
corresponding physical speaker output.