DI-Guy SDK Documentation  13.8
diguySound Class Reference

This class is represents a sound file on disk. More...

#include <diguySound.h>

Public Member Functions

const char * get_name ()
 Returns: name of this object. More...
 
const char * get_type_name ()
 Returns: type name of the object; this value will never be NULL. More...
 
int set_sound_filename (const char *sound_filename)
 This function sets the name of the file that contains the waveform data for the sound. More...
 
const char * get_sound_filename ()
 Returns: name of file containing waveform data for sound as set by set_sound_filename(); will never be NULL, but may be the empty string "". More...
 
float get_duration ()
 Returns: the length of the sound in seconds. More...
 
int get_samples_per_second ()
 Returns: the number of samples per second. More...
 
int get_number_of_channels ()
 Returns: the number of sound channels either 1 (mono) or 2 (stereo) More...
 
int get_bit_depth ()
 Returns: the bit depth of a sound, either 8 or 16. More...
 

Private Functions

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

No external access to them is expected or necessary.

class bdiSound
  Deprecated as of DI-Guy 13 More...
 
bdiSoundm_scripted_object
 A pointer to internal data. More...
 
bdiSoundget_scripted_object ()
 
 diguySound (bdiSound *scripted_object)
 A private constructor. More...
 
virtual ~diguySound ()
 A private destructor. More...
 

Detailed Description

This class is represents a sound file on disk.

All Function in this class are callable from:

  • C++
  • Script

Unless otherwise noted.

Constructor & Destructor Documentation

diguySound::diguySound ( bdiSound scripted_object)
private

A private constructor.

virtual diguySound::~diguySound ( )
privatevirtual

A private destructor.

Member Function Documentation

const char* diguySound::get_name ( )

Returns: name of this object.

const char* diguySound::get_type_name ( )

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

int diguySound::set_sound_filename ( const char *  sound_filename)

This function sets the name of the file that contains the waveform data for the sound.

The file should typically be located in the $DIGUY/sfx or $DIGUY/custom/sfx directory.

Parameters
sound_filenamename of file containing waveform data

Returns:

0 on success, -1 on failure

const char* diguySound::get_sound_filename ( )

Returns: name of file containing waveform data for sound as set by set_sound_filename(); will never be NULL, but may be the empty string "".

float diguySound::get_duration ( )

Returns: the length of the sound in seconds.

int diguySound::get_samples_per_second ( )

Returns: the number of samples per second.

int diguySound::get_number_of_channels ( )

Returns: the number of sound channels either 1 (mono) or 2 (stereo)

int diguySound::get_bit_depth ( )

Returns: the bit depth of a sound, either 8 or 16.

bdiSound* diguySound::get_scripted_object ( )
inline

Friends And Related Function Documentation

friend class bdiSound
friend

Deprecated as of DI-Guy 13

Deprecated as of DI-Guy 13

Member Data Documentation

bdiSound* diguySound::m_scripted_object
private

A pointer to internal data.


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