Error message

  • Deprecated function: Array and string offset access syntax with curly braces is deprecated in include_once() (line 20 of /home/drbiz/public/2013.realism.com/includes/file.phar.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home/drbiz/public/2013.realism.com/includes/common.inc).

Adding Audio to X3D

Cathedral at SIenna, ItalyX3D defines localized audio sources and a generalized background source. The localized audio can be positioned in the environment and its range defined. The background audio permiates everywhere. This post will mostly deal with audio in the HTML environment with X3DOM. That is localized, but without any localization information. The support for localized and spatial extent is not yet available in the code.

It is relatively simple to add audio to an existing X3D environment. Two nodes must be added. These nodes define the actual audio source, and its location in the enviroment. The nodes are Sound and AudioClip.

The AudioClip node provides a reference (URL) to the audio file and control parameters, primarily looping. The audio can be disabled using the enabled field. The example for this post is the Siena Cathedral with added audio of Amicus Meus. The audio is set to loop.

The Sound node provides the container for the AudioClip node. It also (by the X3D Standard) provides the spatialization (location and extent) or the audio. In X3DOM these features are not yet implemented, making Sound strictly a container.

For this example the Sound and AudioClip nodes were added to the Siena Cathedral walk-through. It is best viewed full-screen.