Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

Sound Class Reference

MetaObject implementing Sound Object Type. More...

#include <sound.hh>

Inheritance diagram for Sound:

MetaObject LocalSound RemoteSound List of all members.

Public Member Functions

Access Subobjects

Static Public Member Functions


Detailed Description

MetaObject implementing Sound Object Type.

This object type contains sound data and information regarding playback of the sound effect or stream, and sends and receives messages to control playback of the associated sounds. It may be combined with other object types to place the sound in a particular context, for example, in a 3D space using object3d. The behavior of remote and local objects is different: remote objects recieve updates from the local object, and should perform the acctual sound playback (on their local host). The local sound may (optinally) accept the same messages from remote objects, and just forward the message to all local objects (allowing remote objects to control the sound as heard by all remote instances).

Definition at line 44 of file sound.hh.


Constructor & Destructor Documentation

Sound::Sound MetaObject superobject  ) 
 

Constructor.

Definition at line 38 of file sound.cc.


Member Function Documentation

bool Sound::getImmediate  ) 
 

Get the value of sound:immediate property ( If this value is true, then the sound should be played as soon as the "sound" property changes, or is first recieved (that is, when a "property-update" message is recieved for "sound").

).

Definition at line 126 of file sound.cc.

bool Sound::getLoop  ) 
 

Get the value of sound:loop property ( If this value is true, then playback of the sound should loop; that is, when the end of the sound is reached, it should begin again.

).

Definition at line 105 of file sound.cc.

void * Sound::getSound  ) 
 

Get the value of sound property ( The sound data.

Recommended types to support are the various MOD formats (sound/x-mod, sound/x-s3m, sound/x-xm, sound/x-it), raw wave samples (sound/wav, sound/aiff), Ogg Vorbis (sound/x-ogg), and MP3 (sound/mp3), and URL to Ogg or MP3 ("Shoutcast") stream (sound/x-mp3-stream? sound/x-ogg-stream?). ).

Definition at line 81 of file sound.cc.

string Sound::getSoundDatatype  ) 
 

Get the datatype of sound property.

Definition at line 87 of file sound.cc.

unsigned int Sound::getSoundLength  ) 
 

Get the length of the sound.

Definition at line 93 of file sound.cc.

const string Sound::getType  ) 
 

Return type string ("sound").

Definition at line 63 of file sound.cc.

void Sound::registerExtenders  )  [static]
 

Register Extenders.

Definition at line 68 of file sound.cc.

void Sound::setImmediate const bool  value  ) 
 

Set sound:immediate property.

Parameters:
value The new value

Definition at line 136 of file sound.cc.

void Sound::setLoop const bool  value  ) 
 

Set sound:loop property.

Parameters:
value The new value

Definition at line 116 of file sound.cc.

void Sound::setSound void *  data,
unsigned int  length,
const string &  datatype = "?"
 

Set sound property.

Parameters:
value The sound data
value The size of the data (bytes)
datatype The new datatype: if omitted, then the existing datatype will be preserved.

Definition at line 99 of file sound.cc.

Referenced by LocalSound::initialize().


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:55:58 2003 for Interreality Project - VOS by doxygen 1.3.2