AnnAudioEngine is the audio subsystem of Annwvyn. This system is launched by AnnEngine's constructor.
It's goal is to manage the application audio playback. It uses OpenAL to play and spatialize in 3D space audio sources. Internally it also uses libsndfile to load sound samples from (compressed or not) audio files to OpenAL buffers.
AudioEngine act as an object factory for AnnAudioSource objects. Theses object represent “audio sources”. They hold an OpenAL source handle, and can change it's attached buffer, volume, position and manipulate it's playback (permit to play/pause/rewind and loop audio, and to adjust it's volume/gain);
The AudioEngine object also permit you to control the playback of background music, permit you to check the loaded state of an audio buffer, and permit you to load them into memory by hand, if they are going to be needed later.
In all cases, all audio resources are lazily managed: will be loaded once when they are needed, and reside in memory until they are explicitly unloaded.
Every AnnGameObject owns a valid audio source, and provide a simplified interface to make them play audio. They also constantly update their positions.