The incorporation of spatial audio to the simulation of immersive Virtual Reality (VR) environments is becoming essential. The aim of spatialised audio is to create in the listener the illusion of sound sources existing in three-dimensional space, increasing the realism of the VR environment. In the real world, the shape of the listener's head and pinna act as a filter that modifies the sound before it reaches the eardrum. This sound is interpreted by the brain to localise its position. The use of headphones in an immersive VR environment destroys this natural filter. To overcome this limitation, we endeavour to simulate the natural filtering process by adding a series of cues to the original audio signal that can be interpreted by the brain for the spatial localisation of the sound source. Many of these cues are captured in what is known as Head-Related Transfer Function (HRTF).
This thesis describes an open source and multiplatform library developed in C++, the 3DTI Toolkit-BS. Its main task is to process an auditory signal based on its position within the VR environment and the characteristics of the listener and the environment. The library offers a set of algorithms to simulate sources at different distances, to customise the simulation for each listener (by means of HRTF interpolation and convolution) and to simulate sounds whose sources are in enclosed environments (by means of Ambisonics and convolution with Binaural Room Impulse Responses - BRIRs). The library is implemented with a flexible and modular structure, allowing new rendering methods to be integrated.
Current immersive VR environments are dynamic and interactive. The user is constantly moving and interacting with time-varying elements in the environment. In terms of audio, this means that the relative position between the sound sources and the listener are constantly changing.