I’m new to FMOD and have a couple of questions with regards to the time it takes to load sounds and the most efficient way to do things.
I’m developing a game where sound is fundamental, In fact is it’s the main UI driver as the game is designed to be played by people like me who are blind so the on screen graphics are minimal.
The sound engine I was using in my previous releases was OK but had some limitations. For my new project I’d like to start using FMOD as it looks like it should give me everything I need.
I’m developing in C++ on windows using the FMOD low level API. I’ve got sounds loading and playing and the sound environment I’m building is starting to sound how I expect.
However I’m finding the soundscape very slow to load, and I’m not even stressing it that much.
At the moment I’m loading around 10 individual .ogg files. I’m calling Create Sound once for each file and storing the sound structure. As a number of the sounds are repeated from different sound sources, maybe 10 or 15 times, in the soundscape I’m calling play sound per sound source but passing in the same Sound structure returned from Create Sound. This gives me any number of channels per sound structure. Is this the most efficient way to do this? In the end game there’s going to be far more sounds sources and from what I’ve read FMOD should be able to handle that well.
What I was expecting to happen is that the create sound calls would take a little time, disk IO being the main culprit, but the play sound calls to be very fast. This is not what I’m seeing, the play sounds seem to be taking quite a long time to run too. Is this expected? What can I do to decrease the load time and/or play time?
I’ve read that sound banks can be used to contain a number of files and that loading your sounds in to a sound bank during the build process and playing them from the bank during operation is the recommended approach. I’ve been playing with the sound bank generator and can see how that works to generate the SFBs files however what I’ve not worked out yet is how I tell FMOD to look in the SFB file when calling create sound. A couple of questions here:
- I’ve read that loading the sounds from sound banks is much quicker. Is this correct?
- How do I tell FMOD to load my sounds from a sound bank? I’m using the low level API.
Working with 3d sounds:
I’ve got the general idea of the 3d sounds in space, how to position the sound source, how to position the listener however one of the things I’ve not spotted how to do is have a sound take up an area rather than a single point in space. For example, say I’ve got a river running down the left hand side of my soundscape, as the user moves forward the sound of the river at the moment goes behind them. This is because the sound of the river is set to a point in space rather than an area of space. What it should do is continue on their left hand side as they move forward. I could get around this by moving the sound source point in space as the user moves but I wondered if this was the best way of doing it. I’m hoping I’ve missed something in the documentation with regards to setting an area for a sound source. Is there a way to do this or is it something I’m going to need to do manually?
Sorry for all the newbie questions and thanks for your time in reading and answering.