Engine - Audio System Update 2
November 10, 2026
Current Implementation
This week I was able to get the Audio Engine up and running. The library is able to load and play audio files, and I was able to test it with a sine wave and a music file.
Programmer Interface
First, a reminder of the interface from last week:
1
2
3
4
5
6
7
8
9
10
11
namespace eae6320 {
namespace Audio {
cResult Initialize();
cResult CleanUp();
cResult TestSineWave();
cResult Load(const std::string& i_path);
} // namespace Audio
} // namespace eae6320
This week, I implemented the cAudioClip and cAudioPlayer classes. You’ll notice that all platform-specific code is now hidden behind the interface. There are two platform-specific files, Audio.win.cpp and cAudioPlayer.win.cpp, that contain the implementation for Windows.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
namespace eae6320 {
namespace Audio {
cResult Initialize();
cResult CleanUp();
class cAudioClip
{
public:
static cResult Load(cAudioClip*& o_audioClip, const std::string& i_path);
EAE6320_ASSETS_DECLAREDELETEDREFERENCECOUNTEDFUNCTIONS(cAudioClip);
EAE6320_ASSETS_DECLAREREFERENCECOUNTINGFUNCTIONS();
EAE6320_ASSETS_DECLAREREFERENCECOUNT();
};
class cAudioPlayer
{
public:
static cResult Create(cAudioPlayer*& o_audioPlayer, cAudioClip* i_clip);
EAE6320_ASSETS_DECLAREDELETEDREFERENCECOUNTEDFUNCTIONS(cAudioPlayer);
EAE6320_ASSETS_DECLAREREFERENCECOUNTINGFUNCTIONS();
EAE6320_ASSETS_DECLAREREFERENCECOUNT();
cResult Play();
cResult Pause();
cResult Stop();
bool IsPlaying() const;
};
} // namespace Audio
} // namespace eae6320
Next Steps
I’ve been able to follow my timeline extremely well, so I plan to work on polishing what I have so far by testing out other audio files and types. Then, I plan to implement the stretch goals.
Stretch goals for this system include:
- busses
- 3D spatialization (audio listener and attenuation)
- effects