Project

General

Profile

Actions

Feature #21

open

Audio system

Added by quintus almost 3 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
04/28/2021
Due date:
% Done:

0%

Estimated time:

Description

Our central game development library, OGRE, does not provide audio facilities as it restricts itself to rendering questions. We will thus need an audio system. A widespread and cross-platform library for this is OpenAL-Soft, which implements the OpenAL specification. I see that it is not exactly lightweight with regard to its dependencies, but since a 3D game needs things like audio spatialization (this is what makes sounds left from the viewer come from the left speaker, for instance) I do not think that we can go much thinner. libsndio is lightweight, but it is neither available for Windows (thus we would require system-specific code) nor can it do audio spatialization.

OpenAL's and thereby OpenAL-Soft's interface is not exactly welcoming for use in a C++ application. In addition, OpenAL does not help with reading the actual audio data from the disk, which probably means that we will utilise another library to do that as modern audio formats like OGG/Vorbis are not that much fun to implement. Both aspects together signal that we need our own proper API to abstract both aspects away behind an interface that is nice to use namely from within the Scene system. I have added a possible API for this wrapper with commit 73933a39ca16a57a9d4468d279e08145c9a6a3ac. Take a look at the audio/ folder in the repository to see whatever is the current state of it.

Here is a blog post I found that explains how OpenAL works. I will update this ticket's description once I have made up my mind about which audio format is good to use.

This ticket is to track progress on the audio system.

Actions

Also available in: Atom PDF