As the previous section of this chapter shows, the basics of using s3eSound are actually fairly straightforward. The main issue that we have to deal with as developers is the fact that s3eSound can only support raw uncompressed 16-bit PCM samples, which means it is our responsibility to get the sound data into memory so it can be played.
One of the most common file formats for storing sound samples is the WAV file, so wouldn't it be great if we could use this format to store our sound effects? Wouldn't it also be great if we could load these files into memory using the same resource manager code that we've used for textures and 3D models?
The answer to our prayers is the SoundEngine
module, which is a layer that sits on top of s3eSound and allows us to easily load and access sound effects using the resource manager.
The SoundEngine
module doesn't just stop there though. It also wraps up the s3eSound calls we've learnt about in this chapter and it allows us to support...