Engine - Audio System
October 27, 2026
Project Description
My project will be an audio engine that can be used to add, load, and play sounds within a game, using XAudio2 on Windows. The proposed features are:
- Initialize and run a separate audio thread with audio frame updates
- Load/unload WAV, OGG, and MP3 files into
cAudioClip - Set properties on
cAudioClip(see below) - Play and stop
cAudioPlayer
Programmer Interface
This is a rough outline of the ideal programmer interface for my implementation.
1
2
3
4
5
6
7
-- audioClip.lua
return {
path = "stringPath",
loop = false,
autoPlay = false,
volumeDb = 0.0,
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
namespace eae6320 {
namespace Audio {
cResult Initialize();
cResult CleanUp();
class cAudioClip {
static cResult Load(cAudioClip& o_clip, std::string i_path);
}
class cAudioPlayer {
cAudioClip m_audioClip;
void Play();
void Stop();
}
} // namespace Audio
} // namespace eae6320
Challenges
The real challenge here is going to be the code architecture. I’m not too worried about XAudio2, but I’ve never created an Audio Engine before, so I anticipate potentially running into hiccups with initializing the audio in a separate thread and the state machine logic.
Stretch Goals
Stretch goals for this system include:
- buses
- 3D spatialization (audio listener and attenuation)
- effects