Audio system for 2D and 3D spatial audio
The Polytree Engine audio system implemented uses FMOD and is a fairly simple implementation. The audio system takes sounds, handles playback options, sets listeners in scene and supports audio channel groups.
Below is an implementation of 3D audio in-game:
3D Audio implementation in Polytree Engine
Below is the implementation used for the AudioSytem in Polytree Engine:
With this interface, I was able to call into the required functions from Game and allow for audio playback.
Below are some code implementations for the various functions highlighted above:
Playing 3D sound at a location
Stop playing sound
Setting 3D sound playback balance on both the left and right speakers
Setting sound playback speed on both the left and right speakers
This simple audio system provided all the functionality needed to play audio in specific locations/times in-game.