DI-Guy SDK Documentation  13.1
diguy_module_sound_openal.h File Reference
#include <declspec_diguy.h>

Go to the source code of this file.

Functions

int diguy_sound_openal_initialize (bdiSoundInitOpenAL *init)
 This function tells DI-Guy that it should use the OpenAL API for playing back sounds. More...
 
int diguy_sound_openal_get_defaults (bdiSoundInitOpenAL *init)
 Fills out the init structure with default values. More...
 
int diguy_sound_openal_deinitialize ()
 This function tells DI-Guy to shut down the OpenAL DirectSound API for playing back sounds. More...
 

Function Documentation

int diguy_sound_openal_initialize ( bdiSoundInitOpenAL init)

This function tells DI-Guy that it should use the OpenAL API for playing back sounds.

This function must be called before a scenario is created.

This function must be called after the main DI-Guy initialize call (e.g., diguy_ogl_initialize()).

Returns:

0 on success, -1 on failure

Example:

1 bdiSoundInitOpenAL init;
2 
3 diguy_ogl_initialize(NULL);
4 diguy_script_lua_initialize();
5 diguy_sound_openal_get_defaults(&init);
6 diguy_sound_openal_initialize(&init);
7 
8 diguyScenario* scenario = diguy_create_scenario();
int diguy_sound_openal_get_defaults ( bdiSoundInitOpenAL init)

Fills out the init structure with default values.

Selected entries can then be changed before calling diguy_sound_openal_initialize().

Parameters
initpointer to type bdiSoundInitOpenAL

Returns:

0 on success, -1 on failure

int diguy_sound_openal_deinitialize ( )

This function tells DI-Guy to shut down the OpenAL DirectSound API for playing back sounds.

Returns:

0 on success, -1 on failure