0
0

I’d like to stash a midi file and dls file in the fsb. I can’t seem to associate the midi file with the dls file. I know I can associate the two in the api by using FMOD_CREATESOUNDEXINFO, but it’s not clear how to do this in the designer.

  • You must to post comments
0
0

i think at the moment fmod designer will try and convert the file into the target format you have specified, so if it was mp3 or xma for example, your midi would be decoded and stored in that format. For straight dls/midi, you would have to use code at the moment.

You could use a ‘programmer sound’ in fmod designer, then in code, you get a callback for when the event api asks you to create that sound. That is probably the best way.

  • You must to post comments
0
0

Finally, I’m back on this task. I’m not sure what you mean by ‘programmer sound’.

  • You must to post comments
0
0

In the sound definition view, right click on a sound definition, select "Add programmer sound". Whenever this sound needs to be loaded, the programmer gets an EVENT_CALLBACKTYPE_SOUNDDEF_CREATE callback and whenever it needs to be unloaded the programmer gets an EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE callback. In this way, the programmer can control the loading/unloading of sounds using the low-level FMOD API (just call System::createSound) or whatever is required. This mechanism allows the programmer to choose whatever sound they like at runtime given that they control loading/unloading.

Cheers,

  • You must to post comments
0
0

Thanks very much!

  • You must to post comments
0
0

Maybe you can clear up my confusion. I have a callback function in which I’d like to load the midi & dls files using createSound. I’ve set up my programmer sound in the fsb, and in code I getGroup, then GetEvent. I can’t assign the callback using setCallback on the event until I’ve created the event. So how do I catch the EVENT_CALLBACKTYPE_SOUNDDEF_CREATE callback?

  • You must to post comments
0
0

EVENT_CALLBACKTYPE_SOUNDDEF_CREATE is called when that sound is about to be played i.e. you’ll never get that callback until you call Event::start().

Cheers,

  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.