Virtual sound source positioning

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.

FIELD OF THE INVENTION

The present invention generally relates to providing cues as to the spatial location of a virtual signal source in a simulated environment; and more specifically, pertains to determining an output for one or more physical output devices to simulate a perception at a virtual object, as a function of a position and an orientation of the virtual object and as function of a position of virtual output devices relative to the virtual signal source.

BACKGROUND OF THE INVENTION

When experiencing a virtual environment graphically and audibly, a participant is often represented in the virtual environment by a virtual object. A virtual sound source produces sound that should vary realistically as movement between the virtual sound source and the virtual object occurs. The person participating in the virtual environment should ideally hear sound corresponding to the sound that would be heard by the virtual object representing the person in the virtual environment. In attempting to achieve this goal in the prior art, one or more signals associated with a simulated signal source are output through one or more stationary output devices.

Sound associated with a simulated sound source in a computer simulation is played through one or more stationary speakers. Because the speakers are stationary relative to the participant in the virtual environment, they typically do not accurately reflect a location of the simulated sound source, particularly when there is relative movement between the virtual sound source and the virtual object representing the participant. Accurate spatial location of the simulated sound source is a function of direction, distance, and velocity of the simulated sound source relative to a listener represented by the virtual object. Independent sound signals from sufficiently separated fixed speakers around the listener can provide some coarse spatial location, depending on a listener's location relative to each of the speakers. However, for more accurate spatial location, other audio cues must be employed to indicate position and motion of the simulated sound source. One such audio cue is the result of the difference in the times at which sounds from the speakers arrive at a listener's left and right ears, which provides an indication of the direction of the sound source relative to the listener. This characteristic is sometimes referred to as an inter-aural time difference (ITD). An example of an ITD system is disclosed by Massie et al. (U.S. Pat. No. 5,943,427). Another audio cue relates to the relative amplitudes of sound reaching the listener from different sources, which can be varied with a gain control (i.e., a volume control). The approach of a sound source toward the listener can be indicated by controlling the gain (or attenuation) to provide an increasing volume from a speaker. Angular direction to a source relative to the listener can also be indicated by producing a greater volume from one speaker than from another speaker, and changes in the angular direction can be indicated by changing these relative volumes. This amplitude variation is sometimes referred to as inter-aural intensity difference (IID).

Often, however, these simple binaural cues are inaccurate, because the precise location of the listener is not known. For example, the listener may be very close to a speaker that produces a low volume, such that the volume from each of a plurality of surrounding speakers is perceived as substantially equivalent by the listener. Similarly, the listener's head may be orientated such that the sounds produced by each speaker may reach both ears of the listener at about the same time. These binaural cues also become unreliable when attempting to estimate a sound's location in three-dimensional (3D) free space rather than in a two-dimensional (2D) plane, because the same IDT and/or IID results at an infinite number of points along curves of equal distance from the listener's head. For example, a series of points that are equal distance from the listener's head may form a circle. The IDT and/or IID at any point on this circle is the same. Thus, the listener cannot distinguish the true location of a simulated sound source that emanates from any one of the points on the circle. A series of these curves expand away from the listener, resulting in a conical shape. For this reason, the spatial location ambiguity is sometimes called “a cone of confusion.”

To compensate for these inadequacies, prior art systems have been developed that alternatively or additionally estimate acoustic filtering corresponding to the sound wave diffraction by the listener's head, torso, and outer ear (pinna). It is believed that the human ear may obtain spatial cues from this natural filtering of sound frequencies. Thus, these practitioners estimate and apply filtering functions to the simulated sound in an attempt to provide frequency-based spatial cues to the listener. Such functions are referred to as Head-Related Transfer Functions (HRTFs). Specifically, the HRTF is an individual listener's left or right ear far-field frequency response, as measured from a point in 3D space to a point in the ear canal of the listener. Thus, the HRTF is unique to each individual. Consequently, an HRTF is difficult to generalize for all listeners, and is complex to apply. Often, dedicated real time digital signal processing (DSP) hardware is needed to implement even simple spatialization algorithms. Also, implementing an HRTF requires storing, accessing, and processing a substantial amount of data. Such tasks often lead to a computational bottleneck for spatialization processing, which may be unacceptable in games and virtual environment programs, particularly, because it is difficult to implement HRTFs with low-cost computing devices. Moreover, HRTFs do not fully address certain of the spatialization problems. For example, HRTFs often cause sounds that originate in front of a listener to actually sound like they originate behind the listener. Also, for sounds near a median plane between the listener's two ears, HRTFs are known to cause a listener to perceive that the sound emanates from inside the head instead of outside the head of the listener.

In short, there is no universally acceptable approach to guarantee accurate spatial localization with fixed speakers, even using high-cost, complex calculations. Nevertheless, it would be preferable to devise an alternative that provides more accurate spatial localization than basic IDT and/or IID binaural techniques, yet is more computationally efficient and cost effective than HRTFs. To achieve greater accuracy than basic IDT and/or IID binaural techniques, it is further preferable to improve computational efficiency to enable computational solutions to the problem to be applied. Typically, binaural techniques use polar or spherical coordinates in trigonometric calculations required to control the sound produced by different speakers to better simulate what a listener would expect to hear at the location of virtual object in a virtual environment in response to sound produced by a virtual sound source. Trigonometric calculations usually require more computational resources than those involving Cartesian coordinates. Thus, it is preferable to use Cartesian coordinates in the proposed alternative.

SUMMARY OF THE INVENTION

The present invention provides a method and system for determining an output signal to drive one or more physical sound sources, such as speakers, to simulate the spatial perception of a virtual sound source by a virtual listener in a virtual environment, based on the orientation of the virtual listener relative to the virtual sound source. The invention uses vectors between the virtual sound source and the virtual listener and between the virtual sound source and one or more virtual speakers that remained fixed relative to the location and orientation of the virtual listener in the virtual environment. The virtual speakers track any change in the location and/or orientation of the virtual listener relative to the virtual sound source, so that updated vectors reflect current and changing spatial positions of the virtual sound source. Each vector is used with a linear or nonlinear function to determine the amplitude of the output signal to drive each physical speaker. The output signal amplitude translates into the volume at each physical speaker, so that a real listener can more accurately detect the spatial location of the virtual sound source, as if the real listener were in the place of the virtual listener in the virtual environment. A changing volume at each physical speaker also indicates motion of the virtual listener or the virtual sound source. Multiple virtual speaker vectors can also be used in combination to determine an output signal to drive fewer physical speakers, such as vector for four virtual speakers around the virtual listener to generate an output signal at each of two physical speakers.

The virtual speakers can be located anywhere around the virtual listener. Preferably, however, the virtual speakers are located on a unit sphere that remains centered on the virtual listener as the virtual listener changes position and/or orientation in the virtual environment. The virtual speakers may be located at predefined locations on the unit sphere or selectively located on the unit sphere via a user interface. The virtual sound source vector is also preferably normalized to the unit sphere to simplify computations. Cartesian coordinates are also used to simplify computations.

Another aspect of the invention is a method and system for attenuating the output signal to drive each physical speaker. A further aspect of the invention is a machine readable medium storing machine instructions for performing the invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

A preferred embodiment of the present invention is described below in regard to an exemplary use in providing audio for an electronic gaming system that is designed to execute gaming software distributed on a portable, removable medium. Those skilled in the art will recognize that the present invention may also be implemented in conjunction with a set-top box, an arcade game, a hand-held device, an attached high fidelity system or associated computer speaker system, and other related systems. It should also be apparent that the present invention may be practiced on a single machine, such as a single personal computer, or practiced in a network environment, with multiple consoles or computing devices interconnected with one or more server computers.

Exemplary Operating Environment

As shown inFIG. 1, an exemplary electronic gaming system100that is suitable for practicing the present invention includes a game console102and support for up to four user input devices, such as controllers104aand104b. Game console102is equipped with an internal hard disk drive (not shown in this Figure) and a portable media drive106that supports various forms of portable optical storage media, as represented by an optical storage disc108. Examples of suitable portable storage media include DVD discs and CD-ROM discs. In this gaming system, game programs are preferably distributed for use with the game console on DVD discs, but it is also contemplated that other storage media might instead be used on this or other types of systems that employ the present invention.

On a front face of game console102are four slots110for connection to supported controllers, although the number and arrangement of slots may be modified. A power button112, and an eject button114are also positioned on the front face of game console102. Power button112controls application of electrical power to the game console, and eject button114alternately opens and closes a tray (not shown) of portable media drive106to enable insertion and extraction of storage disc108, so that the digital data on it can be read for use by the game console.

Game console102connects to a television or other display monitor or screen (not shown) via audio/visual (A/V) interface cables120. A power cable plug122conveys electrical power to the game console when connected to a conventional alternating current line source (not shown). Game console102includes an Ethernet data connector124to transfer and receive data over a network (e.g., through a connection to a hub or a switch—not shown), or over the Internet, for example, through a connection to an xDSL interface, a cable modem, or other broadband interface (not shown). Other types of game consoles that implement the present invention may be coupled together or to a remote server, by communicating using a conventional telephone modem.

Each controller104aand104bis coupled to game console102via a lead (or alternatively through a wireless interface). In the illustrated implementation, the controllers are universal serial bus (USB) compatible and are connected to game console102via USB cables130. Game console102may be equipped with any of a wide variety of user devices for interacting with and controlling the game software. As illustrated inFIG. 1, each controller104aand104bis equipped with two thumbsticks132aand132b, a D-pad134, buttons136, and two triggers138. These controllers are merely representative, and other gaming input and control devices may be substituted for or added to those shown inFIG. 1for use with game console102.

A removable function unit140can optionally be inserted into controller104to provide additional features and functions. For example, a portable memory unit (MU) enables users to store game parameters and port them for play on other game consoles, by inserting the portable MU into a controller connected to the other game console. Another removable functional unit comprises a voice communication unit that enables a user to verbally communicate with other users locally and/or over a network. Connected to the voice communication unit is a headset142, which includes a boom microphone144. In the described implementation, each controller is configured to accommodate two removable function units, although more or fewer than two removable function units or modules may instead be employed.

Gaming system100is capable of playing, for example, games, music, and videos. It is contemplated that other functions can be implemented using digital data stored on the hard disk drive or read from optical storage disc108in drive106, or using digital data obtained from an online source, or from MU140. For example, gaming system100is potentially capable of playing:Game titles stored on CD and DVD discs, on the hard disk drive, or downloaded from an online source;Digital music stored on a CD in portable media drive106, in a file on the hard disk drive (e.g., Windows Media Audio™ (WMA) format), or derived from online streaming sources on the Internet or other network; andDigital A/V data stored on a DVD disc in portable media drive106, or in a file on the hard disk drive (e.g., in an Active Streaming Format), or from online streaming sources on the Internet or other network.

FIG. 2shows functional components of gaming system100in greater detail. Game console102includes a central processing unit (CPU)200, and a memory controller202that facilitate processor access to a read-only memory (ROM)204, a random access memory (RAM)206, a hard disk drive208, and portable media drive106. CPU200is equipped with a level 1 cache210and a level 2 cache212to temporarily store data so as to reduce the number of memory access cycles required, thereby improving processing speed and throughput. CPU200, memory controller202, and various memory devices are interconnected via one or more buses, including serial and parallel buses, a memory bus, a peripheral bus, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures can include an Industry Standard Architecture (ISA) bus, a micro channel architecture (MCA) bus, an enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a peripheral component interconnect (PCI) bus.

As an example of one suitable implementation, CPU200, memory controller202, ROM204, and RAM206are integrated onto a common module214. In this implementation, ROM204is configured as a flash ROM that is connected to memory controller202via a PCI bus and a ROM bus (neither of which are shown). RAM206is configured as multiple double data rate synchronous dynamic RAMs (DDR SDRAMs) that are independently controlled by memory controller202via separate buses (not shown). Hard disk drive208and portable media drive106are connected to the memory controller via the PCI bus and an advanced technology attachment (ATA) bus216.

A 3D graphics processing unit (GPU)220and a video encoder222form a video processing pipeline for high-speed and high-resolution graphics processing. Data are carried from graphics processing unit220to video encoder222via a digital video bus (not shown). An audio processing unit224and an audio encoder/decoder (CODEC)226form a corresponding audio processing pipeline for high fidelity and stereo audio data processing. Audio data are carried between audio processing unit224and audio CODEC226via a communication link (not shown). The video and audio processing pipelines output data to an A/V port228for transmission to the television or other display monitor. In the illustrated implementation, video and audio processing components220–228are mounted on module214.

Also implemented by module214are a USB host controller230and a network interface232. USB host controller230is coupled to CPU200and memory controller202via a bus (e.g., the PCI bus), and serves as a host for peripheral controllers104a–104d. Network interface232provides access to a network (e.g., the Internet, home network, etc.) and may be any of a wide variety of various wire or wireless interface components, including an Ethernet card, a telephone modem interface, a Bluetooth module, a cable modem interface, an xDSL interface, and the like.

Game console102has two dual controller support subassemblies240aand240b, with each subassembly supporting two game controllers104a–104d. A front panel input/output (I/O) subassembly242supports the functionality of power button112and eject button114, as well as any light-emitting diodes (LEDs) or other indicators exposed on the outer surface of the game console. Subassemblies240a,240b, and242are coupled to module214via one or more cable assemblies244.

Eight function units140a–140hare illustrated as being connectable to four controllers104a–104d, i.e., two function units for each controller. Each function unit140offers additional functionality or storage on which games, game parameters, and other data may be stored. When an MU is inserted into a controller, the MU can be accessed by memory controller202.

A system power supply module250provides power to the components10fgaming system100. A fan252cools the components and circuitry within game console102.

To implement the present invention, a game software application260comprising machine instructions stored on a DVD or other storage media (or downloaded over the network) is loaded into RAM206and/or caches210,212for execution by CPU200. Portions of software application260may be loaded into RAM only when needed, or all of the software application (depending on its size) may be loaded into RAM206. Software application260and the relevant functions that it performs to implement the present invention are described below in greater detail.

Gaming system100may be operated as a stand-alone system by simply connecting the system to a television or other display monitor. In this standalone mode, gaming system100enables one or more users to play games, watch movies, or listen to music. However, with connectivity to the Internet or other network, which is made available through network interface232, gaming system100may be further operated as a component of a larger network gaming community, to enable online multiplayer interaction in games that are played over the Internet or other network with players using other gaming systems. Gaming system100can also be coupled in peer-to-peer communication with another gaming system using the network interface and appropriate cable.

Network System

FIG. 3shows an exemplary network gaming environment300that interconnects multiple gaming systems100a, . . .100nvia a network302. Network302represents any of a wide variety of data communications networks and may include public portions (e.g., the Internet), as well as private portions (e.g., a residential or commercial local area network (LAN)). Network302may be implemented using any one or more of a wide variety of conventional communication configurations, including both wired and wireless types. Any of a wide variety of communications protocols can be used to communicate data via network302, including both public and proprietary protocols. Examples of such protocols include TCP/IP, IPX/SPX, NetBEUI, etc.

In addition to gaming systems100, one or more online services304a, . . .304sare accessible via network302to provide various services for the participants, such as serving and/or hosting online games, serving downloadable music or video files, hosting gaming competitions, serving streaming A/V files, enabling exchange of email or other media communications, and the like. Network gaming environment300may further employ a key distribution center306that plays a role in authenticating individual players and/or gaming systems100for interconnection to one another, as well as to online services304a, . . .304s. Distribution center306distributes keys and service tickets to valid participants that may then be used to form game playing groups including multiple players, or to purchase services from online services304a, . . .304s.

Network gaming environment300introduces another memory source available to individual gaming systems100, i.e., online storage. In addition to accessing data on optical storage disc108, hard disk drive208, and stored in the MU(s), gaming system100acan also access data files available at remote storage locations via network302, as exemplified by remote storage308at online service304s.

Network gaming environment300further includes a developer service309with which developers can produce media effects, updated media data, game code, and other services. Such services can be distributed between the online services and the producers of games for the gaming systems, and between other devices within, and outside of Network gaming environment300.

Exemplary Amplitude Attenuation Process

An exemplary embodiment of the present invention is directed to attenuating audio volume (i.e., amplitude or sound level) for a plurality of physical speakers to simulate the sound that would be heard from a virtual sound source in a virtual environment by a virtual object representing the listener, for use in connection with an electronic game or other type of virtual environment. As indicated above in the Background of the Invention section, the location and orientation of a real listener (e.g., a computer game participant of player) is typically not known to the software. However, in cases such as computer games and virtual simulations, the virtual location and orientation of a virtual point in the virtual environment, e.g., the location of the virtual object representing the person (referred to hereafter as the virtual listener) is often known. Alternatively, a virtual location and orientation may be estimated or assumed. In such cases, it is preferable to use the virtual listener's location and orientation rather than use complex HRTF.

FIG. 4illustrates a virtual environment and relationships between a virtual listener320, a virtual sound source322, and virtual speakers324a–324d. Virtual listener320represents the simulated character in the computer game. Those skilled in the art will recognize that virtual listener320may be any other simulated object or any point whose position can be determined within the virtual environment. The position of virtual listener320may change within and relative to the virtual environment, however, for purposes of the present invention, virtual listener320is always considered to remain at a local origin of a unit sphere326. In other words, unit sphere326is always centered on virtual listener320, although unit sphere326and virtual listener320may move about within the virtual environment, relative to a global origin of the virtual environment. Relative to the local origin of unit sphere326, virtual listener320may be oriented to face in any 3D direction. A forward vector328indicates an azimuth of virtual listener320. Similarly, a top vector329indicates an elevation of virtual listener320relative to the local origin of unit sphere326.

Virtual sound source322may be located at any position within the virtual environment. However, a virtual sound source vector330is normalized to define a corresponding local position of virtual sound source322on unit sphere326. Virtual sound source322may be a stationary or moving source of sound, such as another character or other sound-producing object in the virtual environment.

Also located on unit sphere326are virtual speakers324a–324d. Those skilled in the art will recognize that any number of virtual speakers may be used, and in a preferred form of the present invention, the virtual speakers correspond to an equal or different number of physical speakers. For example, multiple virtual speakers may represent multiple channels that are mixed to a single physical speaker. In any case, virtual speakers324a–324dmay be selectively positioned anywhere on unit sphere326. Preferably, the positions of virtual speakers324a–324dsimulate the positions of the physical speakers, which will typically be spaced apart or positioned around a physical listener, such as a participant in the computer game or virtual simulation. Once the positions of virtual speakers324a–324dare determined on unit sphere326, virtual speakers324a–324dpreferably remained fixed relative to virtual listener320and move with unit sphere326as the virtual listener moves relative to the virtual environment. For example, if virtual listener320changes orientation by rotating about top vector329, virtual speakers324a–324dare rotated about top vector329through an equivalent angle. In any case, virtual speakers324a–324dremain fixed relative to unit sphere326and move with unit sphere326in a manner corresponding to the movement of virtual listener320.

Associated with each virtual speaker is a virtual speaker vector that extends between the virtual speaker and virtual sound source322. For example, a virtual speaker vector334ais associated with virtual speaker324a. Virtual speaker vectors334a–334dpreferably change as virtual sound source322moves relative to virtual listener320in the virtual environment. Similarly, virtual speaker vectors334a–334dchange as virtual listener320moves or changes orientation relative to virtual sound source322in the virtual environment.

FIG. 5is a flow diagram illustrating the logical steps employed to determine an audio volume for each physical speaker as a function of the position and orientation of the virtual listener and virtual speakers relative to the virtual sound source. At a step340, a user may selectively (optionally) designate locations of one or more virtual speakers on the unit sphere centered on the virtual listener. Preferably, the user designates the original virtual locations prior to action or play within the virtual environment, but alternatively, might modify the disposition of the virtual speakers on the unit sphere at anytime. However, those skilled in the art will recognize that adjustments to the virtual locations of the virtual speakers may be made at any time. A graphical user interface (GUI) preferably illustrates the unit sphere and enables the user to graphically designate the original locations of the virtual speakers on the unit sphere, and to input the number N of physical speakers to be employed. For simplicity, and computational efficiency, the GUI may limit the original virtual locations of the virtual speakers to a 2D unit circle formed by a generally horizontal plane through the unit sphere. Often, such a limitation reflects the arrangement of the physical speakers, such as a surround sound (“5.1” system) arrangement of physical speakers. However, the original locations of the virtual speakers on the unit sphere can reflect more complex arrangements, such as non-planar positions of physical speakers in a media room, theatre, vehicle, or other physical environment. In any case, if the user does not designate the original virtual locations, an audio module for the computer game will provide default original locations of the virtual speakers. For example, the audio module may position the N (or more) virtual speakers at equally spaced intervals around the virtual listener on the 2D unit circle.

After the original virtual speaker locations are specified and game play begins, the audio module computes a volume attenuation for each virtual speaker during each frame of execution. Note that as used herein, it should be understood that the term “volume attenuation” can instead be a volume gain setting. The key point is that the present invention controls sound level. Each volume attenuation will be applied to the signal representing the sound from the virtual sound source before the signal is routed to drive a specific physical speaker. The process of computing the volume attenuations (or more generally, for computing the sound levels) begins at a step342, wherein the audio module computes a 3D distance between the virtual listener and the virtual sound source. In other words, the audio module calculates the magnitude of the vector from the virtual listener to the virtual sound source in the simulated environment. Preferably, the audio module uses the following well known formula to calculate the magnitude.

magnitude=(VSSx-VLx)2+(VSSy-VLy)2+(VSSz-VLz)2
To simplify and speed processing, all computations are performed in Cartesian coordinates. As indicated above, conversion to and calculations using polar or spherical coordinates are inefficient, because substantially more complex trigonometric computations must be performed than when using Cartesian coordinates.

Once the distance between the virtual listener and the virtual sound source is determined, the audio module computes a volume attenuation, at a step344, for each physical speaker based on any change in distance (a distance shift attenuation) between the virtual sound source and the virtual listener since a previous execution frame. A number of techniques for determining distance shift attenuation are well known. For example, as described above, the audio module may simply reduce the volume (i.e., increase the attenuation) if the distance between the virtual sound source and the virtual listener has increased since the previous execution frame. Those skilled in the art will recognize that other more complex distance shift methods can be used. At a step346, the audio module adjusts the volume attenuation, based on the well known Doppler shift. Finally, at a step348, the audio module performs a unique volume attenuation based on an orientation of the virtual listener and virtual speakers relative to the virtual sound source. Further detail for this last volume attenuation is provided below with regard toFIG. 6.

FIG. 6is a flow diagram illustrating the logical step employed for computing a volume attenuation for one or more physical speakers, based on an orientation of the virtual listener and virtual speakers relative to the virtual sound source. At a step350, the audio module establishes the local origin at the Cartesian position of the virtual listener in the virtual environment. Effectively, the audio module determines local coordinates for the virtual sound source relative to the position of the virtual listener in the simulated environment. For example, the audio module may simply subtract each global Cartesian coordinate component of the virtual listener from each global Cartesian coordinate component of the virtual sound source to determine local coordinates of the virtual sound source. This localization process need not be applied to the virtual speaker coordinates, since the virtual speakers remain on the unit sphere. Having localized the virtual sound source, the audio module normalizes the virtual sound source vector between the virtual listener and the virtual sound source. As is well known, this normalization may be achieved by dividing each Cartesian coordinate component of the virtual sound source vector by the magnitude (i.e., the length) of the virtual sound source vector.

The above normalized virtual sound source vector does not depend on the orientation of the virtual listener. However, the position of the virtual speakers, and therefore, each virtual speaker vector does depend on the orientation of the virtual listener relative to the virtual sound source. Consequently, the magnitude of each virtual speaker vector depends on the orientation of the virtual listener relative to the virtual sound source. The audio module uses these virtual speaker vector magnitudes to further adjust the volume attenuation for each physical speaker, thereby providing more accurate spatial location cues to the user without excessively complex computations such as those of HRTFs. Further, because all of the vector calculations are performed in Cartesian coordinates, using virtual speaker vectors to determine the physical speaker attenuation is more computationally efficient than traditional IDT and IID techniques.

To begin determining the virtual speaker vectors, at a step354, the audio module first obtains a front orientation angle (i.e., an azimuth) and a top orientation angle (i.e., an elevation) of the virtual listener. With this orientation information, the audio module creates a transformation matrix, at a step356, as is well known to those of ordinary skill. At a step358, the audio module transforms the virtual speaker locations from their originally designated virtual locations, or from their locations in the previous execution frame, to new positions relative to the virtual listener's orientation. Effectively, the audio module transforms the locations of the virtual speakers on the unit sphere to follow any change in orientation of the virtual listener in the virtual environment.

Having transformed the virtual speaker locations, the audio module loops through the following steps for each of the N virtual speakers. At a step360, the audio module determines a 3D vector between the current virtual speaker and the virtual sound source. In a manner similar to that described above, the audio module computes a magnitude of the current virtual speaker vector, at a step362. At a step364, the audio module computes a volume attenuation factor based on the current virtual speaker vector magnitude. Preferably, the volume attenuation factor is computed by a nonlinear function such as one of those shown below.
Volume attenuation factor=1−e−((virtualspeakermagnitude)/Alpha)2
where Alpha is a scaling value that is empirically determined to provide a sufficiently wide Gaussian function. Preferably, Alpha is approximately 0.20, however, any value can be employed that provides smooth movement of sound from speaker to speaker as the virtual listener or virtual sound source moves, based on sufficient overlap of exponentials representing each speaker.

Alternatively, faster computation can be achieved by using a linear function such as the following dot product.
Volume attenuation factor=(virtual speaker vector)x·(virtual sound source)x+(virtual speaker vector)y·(virtual sound source)y+(virtual speaker vector)z·(virtual sound source)z

At a decision step366, the audio module determines whether a current virtual speaker count J is still less than the total number of virtual speakers N. If a volume attenuation factor must be computed for another virtual speaker, the audio module increments counter J at a step368. Control then returns to step360to process the next virtual speaker. When all virtual speakers have been processed, the volume attenuation factor for each virtual speaker is applied to set the sound level produced by the corresponding physical speaker. As a result, the listener actually hears a sound corresponding to the sound produced by the virtual sound source that closely simulated what the virtual listener would hear within the computer game or other virtual environment. The approach used in the present invention avoids imposing a processing overhead that might slow the play in a computer game or other virtual environment, yet still provides realistic production of the sound that would be heard by the virtual listener.