C++ SDK Reference  12.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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...
 
int set_phoneme_filename (const char *phoneme_filename)
 This function sets the name of the file that contains the phoneme data for the sound. More...
 
const char * get_phoneme_filename ()
 Returns: name of file containing phoneme data as set by set_phoneme_filename() 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
 
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 c:/diguy125/sfx or c:/diguy125/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 "".

int diguySound::set_phoneme_filename ( const char *  phoneme_filename)

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

The file should typically be located in the same place as its waveform counterpart.

Phoneme files are optional.

Parameters
phoneme_filenamename of file containing phoneme data

Returns:

0 on success, -1 on failure

const char* diguySound::get_phoneme_filename ( )

Returns: name of file containing phoneme data as set by set_phoneme_filename()

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

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: