H3D::X3DSoundSourceNode Class Reference
[Abstract nodes.]

This abstract node type is used to derive node types that can emit audio data. More...

#include <X3DSoundSourceNode.h>

Inheritance diagram for H3D::X3DSoundSourceNode:

Inheritance graph
List of all members.

Public Member Functions

 X3DSoundSourceNode (Inst< SFNode > _metadata=0, Inst< SFString > _description=0, Inst< SFBool > _loop=0, Inst< SFTime > _pauseTime=0, Inst< SFFloat > _pitch=0, Inst< SFTime > _resumeTime=0, Inst< StartTime > _startTime=0, Inst< StopTime > _stopTime=0, Inst< SFTime > _duration_changed=0, Inst< SFTime > _elapsedTime=0, Inst< SFBool > _isActive=0, Inst< SFBool > _isPaused=0, Inst< TimeHandler > _timeHandler=0)
 Constructor.
virtual void initALBuffers (bool stream)
 Reads new data into the OpenAL from the reader and attaches them to the sound sources that use this sound source.
virtual void ALrender ()
 Perform the OpenAL calls to render the sound.
virtual string defaultXMLContainerField ()
 Returns the default xml containerField attribute value.
virtual void registerSoundNode (X3DSoundNode *n)
 Register this sound node with the X3DSoundSourceNode.
virtual void unregisterSoundNode (X3DSoundNode *n)
 Unregister this sound node with the X3DSoundSourceNode.
virtual void onPause ()
 On pause, pause the sound.
virtual void onResume ()
 On resume, resume paused sound.
virtual void onStart ()
 On start, initialize AL buffers and start playing.
virtual void onStop ()
 On stop, stop playing the sound.

Public Attributes

auto_ptr< SFStringdescription
 The description field specifies a textual description of the audio source.
auto_ptr< SFFloatpitch
 The pitch field specifies a multiplier for the rate at which sampled sound is played.
auto_ptr< SFTimeduration_changed
 The duration field is the length of time in seconds for one cycle of the audio for a pitch set to 1.0.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.

Protected Attributes

list< X3DSoundNode * > parent_sound_nodes
 The X3DSoundNodes that use this node as sound source.
AutoRef< H3DSoundStreamNodereader
 The H3DSoundStreamNode used to read sound data.
bool sound_as_stream
 Indicates if the current sounds source is being streamed or not.
auto_ptr< ALSoundBuffersound_buffer
 Field that calls ALrender() when a field routed to it has generated an event.

Classes

class  ALSoundBuffer
 Field that calls ALrender() when a field routed to it has generated an event. More...
class  TimeHandler
 TimeHandler is extended to stream audio data to OpenAL buffers if the sound source is a streaming source. More...

Detailed Description

This abstract node type is used to derive node types that can emit audio data.

Internal routes:


Member Function Documentation

virtual string H3D::X3DSoundSourceNode::defaultXMLContainerField  )  [inline, virtual]
 

Returns the default xml containerField attribute value.

For this node it is "children".

Reimplemented from H3D::Node.

void X3DSoundSourceNode::initALBuffers bool  stream  )  [virtual]
 

Reads new data into the OpenAL from the reader and attaches them to the sound sources that use this sound source.

The stream param indicates if it should init a stream source or a static source.

void X3DSoundSourceNode::registerSoundNode X3DSoundNode n  )  [virtual]
 

Register this sound node with the X3DSoundSourceNode.

All X3DSoundSourceNodes that want to play this sound source must register with this function.


Member Data Documentation

auto_ptr< SFString > H3D::X3DSoundSourceNode::description
 

The description field specifies a textual description of the audio source.

Access type: inputOutput
Default value: ""

auto_ptr< SFTime > H3D::X3DSoundSourceNode::duration_changed
 

The duration field is the length of time in seconds for one cycle of the audio for a pitch set to 1.0.

Access type: outputOnly

auto_ptr< SFFloat > H3D::X3DSoundSourceNode::pitch
 

The pitch field specifies a multiplier for the rate at which sampled sound is played.

Values for the pitch field shall be greater than zero.

Access type: inputOutput
Default value: 1.0


Generated on Thu Aug 24 12:40:28 2006 for H3D API by  doxygen 1.4.5