In a sports game, or other types of games that have heavy dialogue asset requirements, we need a way to logically partition sounds so as to use memory efficiently while creating enough variety. On our previous audio system, we had a way of designating sounds such that they would only get loaded into memory when they got a play request, then they’d be evicted. We called it "load-on-demand". This way, we were able to load/access large banks without loading the associated audio data. Can you suggest best practices for accomplishing a similar goal? Would it be having multiple fdp files each corresponding to a given in-game event? Would we accomplish the same goal by streaming everything? Would you consider implementing load-on-demand functionality? Any feedback would be appreciated. Thanks…
- dforden asked 10 years ago
Currently when you call EventGroup::getEvent, FMOD only loads the subsounds from the wavebanks that are required for that event. This means you can put all your dialog in one bank, call EventGroup::getEvent for each dialog line and then EventGroup::freeEventData(Event *event) to free just the data for the specified event.
But, an even better way of handling dialog is to use "programmer sounds". Make one event that you’ll use for ALL dialog in your game. Put a "programmer" sound in it ("Add programmer sound" in sound definition context menu) and then you’ll get EVENT_CALLBACKTYPE_SOUNDDEF_CREATE and EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE callbacks at runtime. On EVENT_CALLBACKTYPE_SOUNDDEF_CREATE call System::createSound to load your dialog line and on EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE call Sound::release.
This method is superior because you only have one event for ALL dialog lines. This saves bucketloads of memory and saves your sound designers mucho time.
I am using this method to create commentary from a streaming FSB. I am finding that there is a large delay (~0.5s) between calling ‘play’ and the sound actually starting as well as a delay between sounds when using setSubSoundSentence. Is there anyway to decrease this delay?
- Feik answered 5 years ago
Please login first to submit.