The first aspect of 3D audio that we are going to work with (and perhaps the most important) is positional audio. Positional audio deals primarily with the location of each object that produces sound (which we will refer to as audio sources) in relation to or our ears (which we will refer to as the audio listener).
The first step required to create a 3D audio simulation is to describe every audio source and listener in the environment. Note that there is typically only one audio listener in a scene, unless we are creating a multiplayer split-screen type of game. The following figure shows an example of a scene with multiple audio sources and one audio listener in the middle:

For each audio source and listener in the scene, we store information such as position, orientation, and velocity. Using this information, the audio engine produces a 3D audio simulation by modifying all the sounds in real time in several ways:
Position: The volume of a source decreases and becomes...