DI-Guy SDK Documentation  13.2
diguySoundInstance Class Reference

#include <diguySoundInstance.h>

Public Member Functions

const char * get_name ()
 Returns: name of the sound used by the sound instance. More...
 
const char * get_type_name ()
 Returns: type name of the object; this value will never be NULL. More...
 
int play (double offset=0.0)
 This function causes the sound to play immediately, starting from the specified time offset. More...
 
int get_is_playing ()
 Returns: 1 if the sound is playing; 0 if not. More...
 
int get_is_stopping ()
 Returns: 1 if the sound is stopping; 0 if not. More...
 
int stop (float rampdown_time=0.0f)
 This function causes this sound to stop. More...
 
int set_automatic_destroy_flag ()
 This function causes the sound instance to be automatically deleted when the sound has completed. More...
 
void set_is_3d_sound_flag (int is_3d_sound_flag)
 This function sets whether the sound is "ambient" (it will be equally audible from everywhere within the world), or "3d" (it will move with the character. More...
 
int get_is_3d_sound_flag ()
 Returns: 1 if the sound is 3d; 0 if not. More...
 

Private Functions

The functions and variables past this point are for internal use only.

No external access to them is expected or necessary.

bdiSoundInstancem_scripted_object
 A pointer to internal data. More...
 
bdiScenarioCharacterm_character
 
class bdiScenarioCharacter
 
class bdiSoundInstance
 
class bdiSoundFactory
 
class bdiSoundFactoryOpenAL
 
bdiSoundInstanceget_scripted_object ()
 
void clear_scripted_object ()
 
 diguySoundInstance (bdiSoundInstance *scripted_object, bdiScenarioCharacter *character)
 A private constructor. More...
 
virtual ~diguySoundInstance ()
 A private destructor. More...
 

Constructor & Destructor Documentation

diguySoundInstance::diguySoundInstance ( bdiSoundInstance scripted_object,
bdiScenarioCharacter character 
)
private

A private constructor.

virtual diguySoundInstance::~diguySoundInstance ( )
privatevirtual

A private destructor.

Member Function Documentation

const char* diguySoundInstance::get_name ( )

Returns: name of the sound used by the sound instance.

Callable From:

  • C++
  • Script
const char* diguySoundInstance::get_type_name ( )

Returns: type name of the object; this value will never be NULL.

Callable From:

  • C++
  • Script
int diguySoundInstance::play ( double  offset = 0.0)

This function causes the sound to play immediately, starting from the specified time offset.

The sound will continue until it has completed, or it is stopped.

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
int diguySoundInstance::get_is_playing ( )

Returns: 1 if the sound is playing; 0 if not.

Callable From:

  • C++
  • Script
int diguySoundInstance::get_is_stopping ( )

Returns: 1 if the sound is stopping; 0 if not.

Callable From:

  • C++
  • Script
int diguySoundInstance::stop ( float  rampdown_time = 0.0f)

This function causes this sound to stop.

It does not destroy the sound instance. The sound instance can be played again if desired.

Parameters
rampdown_timehow long to take fading out the sound

** Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
int diguySoundInstance::set_automatic_destroy_flag ( )

This function causes the sound instance to be automatically deleted when the sound has completed.

No further calls through the diguySoundInstance object can or should be made, so this function should only be called once all durations, reps, etc. have been set.

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
void diguySoundInstance::set_is_3d_sound_flag ( int  is_3d_sound_flag)

This function sets whether the sound is "ambient" (it will be equally audible from everywhere within the world), or "3d" (it will move with the character.

Parameters
is_3d_sound_flagpass 1 to make the sound 3d; pass 0 to make the sound ambient

Callable From:

  • C++
  • Script
int diguySoundInstance::get_is_3d_sound_flag ( )

Returns: 1 if the sound is 3d; 0 if not.

Callable From:

  • C++
  • Script
bdiSoundInstance* diguySoundInstance::get_scripted_object ( )
inline
void diguySoundInstance::clear_scripted_object ( )
inlineprivate

Friends And Related Function Documentation

friend class bdiScenarioCharacter
friend
friend class bdiSoundInstance
friend
friend class bdiSoundFactory
friend
friend class bdiSoundFactoryOpenAL
friend

Member Data Documentation

bdiSoundInstance* diguySoundInstance::m_scripted_object
private

A pointer to internal data.

bdiScenarioCharacter* diguySoundInstance::m_character
private

The documentation for this class was generated from the following file: