Back to projects

Multithreaded Audio Engine

A C++ audio engine with asynchronous loading and multithreaded playback control.

C++XAudio2Multithreading

The project

Built on XAudio2, the engine delegates audio processing, file loading, and completion callbacks to dedicated threads, separating this work from game updates.

What I built

  • Thread communication: Custom mutex-protected circular queues that pass executable commands between systems.
  • Asset loading: Asynchronous WAV loading with audio-thread registration and game-thread completion callbacks.
  • Playback: Volume, panning, pitch controls, and callback-driven audio sequencing.
  • Sound management: Priority-based allocation and handle-based lifetime management using atomic identifiers and shared/exclusive locks.
Next project: Custom DirectX 11 Graphics Engine