• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Common Elements

A number of things are common to BackgroundSound, PointSound, and ConeSound sources, and a few are common to all applications that use audio. For starters, the audio device must be explicitly created, based on the Viewer object for the universe. The sound sources must be assigned a bounding region that defines when they're audible (or, more accurately, when they can be "scheduled"). The sound sources all need to have a MediaContainer object associated with them, and they all need to be enabled and told how often to loop. In addition, a sound source can be made the child of some other object in the scene, so that it moves right along with that object. For example, you might create a transistor radio object and attach a sound source to it, so that when the radio gets moved the sound travels with it.

We're going to start by modifying our VRML Viewer example. We'll assume that the VRML file we load is a humanoid, and that there's a light source already in the VRML file so we don't need to create one in Java 3D. Everything from our Viewer example will remain the same, up to the point where we have the VRML file loaded and the sceneGroup's capabilities set. Before we add the sceneGroup to the universe, we have some additional work to do.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint