[Foxtrot Engine] Sound System

Overview
Foxtrot Engine is getting into shape. Now it’s time to work on sound system that will add up the auditory experience to the game.
To-do list:
- Find the best suitable framework to implement FT sound system.
- FT sound system implementation.
- Testing & Feedback
Development Logs
2025.06.23. Monday
Finding the best suitable framework to implement FT sound system.
The core features of the sound system can be listed as the following.
- It must be able to receive the audio files loaded to the memory.
- “Conventional” audio files, such as .mp3, .wav, etc.
- It must be able to trigger the audio files to be played in the intended timing.
- It must have playback events, such as playing, pausing, increasing & decreasing volume.
-
It must be a singleton object - one instance, accessible from anywhere.
- (optional) It can have audio events considering the game environment, such as sound fading as the player walks away from the origin.
Considering the factors, the candidates… - Direct Sound
- FMOD
- SoLoud
I decided to try out “SoLoud”. It is free, and the simplicity to use the library hooked my interst. I’ll try implementing a “Sound Manager” with the library, and see how it goes…
2025.08.27. Wednesday
FT sound system implementation.
I expected that making a Sound Manager, which is a singleton object, is much more reasonable for the sake of maintenance. Sound Manager would load the required sound at the point new .chunk is initialized, and constantly enqueue the sound needed to be played during runtime. At the end of a gameloop, (which is a frame), it triggers all the enqueued sounds to be played, and flushing them so that the new sounds for the next frame can be enqueued again.
Ok, that will be enough for a talk. Here’s the video that describes how it works.
There is a problem which I assume to be solved after optimizing the code.
- A bit of delay after triggering the 1st sound to be played.
I know, this can be SERIOUS! Now let me fix it for a while…