[b:2wnukp5s]Detailed description:[/b:2wnukp5s]
Determining what specific sound file should be used by an event at run-time is often desirable, especially for game dialogue.

[b:2wnukp5s]Solution 1:[/b:2wnukp5s]
1. In Designer 2010, create a programmer sound in the Sound Defs View by right-clicking on a Sound Def to open the context-sensitive menu, then selecting the ‘Add "programmer" sound’ menu item.
When a ‘progammer sound’ sound def entry is triggered, an FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE will call the event callback. This callback allows the programmer to create any FMOD::Sound that is desired (typically by calling System::createSound) and pass a pointer to the created sound back to FMOD. The sound will then be used as if FMOD had created it itself.
Once FMOD is finished with the sound it will call the event callback with FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE. At this point, the FMOD::Sound can be freed, released or otherwise appropriately dealt with.

[b:2wnukp5s]Solution 2:[/b:2wnukp5s]
If this flag is specified when EventSystem::init is called, FMOD will refer all loading/unloading of sounds to the programmer through the event callback.
In effect, the FMOD_EVENT_INIT_USER_ASSETMANAGER flag causes every sound to act as a programmer sound.

The following sections of the API documentation may be relevant.
– Event::SetCallback
In addition, the "Use programmer sounds…" section of the "Best practices…" document in the documentation directory contains some additional information.

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.