Plans of Futura’s Soundmanager.

The sound manager for the game has been quite an annoyance since the development library has a bug concerning playing audio.
The development library we use for the game is SFML (Simple and Fast Multimedia Library) while simple it’s got its own sets of problems for game development.

The problem that I’m annoyed by is a bug that when the game gets turned off crashes the game because off a missing .dll that isn’t missing.

Image

While not finished because of the bug and also it’s in need of tweaking.

Fixing the bug:
While the bug is a annoyance it’s not game breaking or very serious since it only affects the game while shutting down and not while playing or starting up the game.
So to fix this bug I have to use another development library, Tommi recommended Fmod and BASS I’m not yet sure if I will replace the code or leave it as is.

The Classes:
The Manager has seven classes
SFMLSoundManager which sets the volume of the sound/song. PlaySound(std::string filename) it plays a single sound file such as a gunshot or a step, gets the duration of the sound and turns off the sound if one is playing.
PlaySong(std::string filename, bool looping) This class plays a song and checks if it should loop. (I’m planning on using .ogg files for the size of the music file.)
StopAllSounds() as you most likely can guess stops all the sounds if they are playing.
IsSoundPlaying() which checks if a sound is currently playing in the game.
IsSongPlaying() it does the same thing as the previous class but for music.

What could I have done better?:
Possibility 1: I could have avoided spending so much time on trying to fix the previously named bug which only makes the game crash while turning the game off and is not interfering with the game play in anyway.

Possibility 2:  I could have read up more on SFML and seen this problem coming up before making it.
That would have made me make the entire sound manager in Fmod or BASS which would maybe have taken a little while longer to make but would in turn work without a hitch.

Possibility 3: I could have used a small part of the SDL library to make the Sound manager and in turn it wouldn’t have taken as long as it did to actually get the sound manager to work properly and it wouldn’t be crashing when the game ended.