It is possible to integrate sound with your 3D web content. The possibilities range from simply playing a wav or mp3 file to using 3D sound effects. For 3D sound you use a cone which defines the origin of the sound and the direction in which the volume is loudest. By connecting the cone to a bone in your model, your sound effects will automatically be linked to your animations. These features will only work for sound devices (software or hardware based) which support Direct 3DSound. If these are not present, the sound will simply play at a constant volume.

You load the sound through a call to arcticDocument::loadSound. You can then create a sound-sequence object through a call to script::addSound. You then need to initialise this object.

Properties, Events and Methods

Name Type Description
pause MethodAdds a pause event to the sequence. This will pause the sound at the specified time.
void pause(float time)
restart MethodAdds a restart event to the sequence. Does not have any effect if the sound is currently playing.
void restart(float time)
start MethodAdds a start event to the sequence. This will start the playing of the wave file.
time start(float time)
stop MethodAdds a stop event to the sequence. This event will stop the sound playing.
void stop(float time)
distanceScale (float) PropertySets or retrieves the distance scale factor.
events PropertyReturns an events collection object containing all the event objects belonging to this sequence.
innerAngle (float) PropertySets or retrieves the angle of the inner cone.
name (String) PropertyThe name of this sequence event
outerAngle (float) PropertySets or retrieves the angle of the outer cone.
outerVolume (float) PropertySets or retrieves the ambient volume.
repeatCount (long) PropertySets or retrieves the repeat count for this sound fragment
type (int) PropertyReturns SQ_SOUND ( 1 )
volume (float) PropertySets or retrieves the value for the volume of this sound.

 

©2000 arcticpigs. All rights reserved.
This is a draft version! The functionality of parts of the software are liable to change.