Java Reference
In-Depth Information
Chapter XII
Of all the human perceptions, two of the most important ones are perhaps vision and sound,
for which we have developed highly specialized sensors over millions of years of evolution.
The creation of a realistic virtual world therefore calls for the development of realistic 3D
virtual objects and sceneries supplemented by associated sounds and audio signals.
The development of 3D visual objects is of course the main domain of Java 3D. How-
ever, as in watching a movie, it is also essential to have realistic sound and audio in some
applications. In this chapter, we will discuss how sound and audio can be added and sup-
ported by Java 3D.
The Java 3D API provides some functionalities to add and control sound in a 3D spatial-
ized manner. It also allows the rendering of aural characteristics for the modeling of real
world, synthetic or special acoustical effects (Warren, 2006).
From a programming point of view, the inclusion of sound is similar to the addition
of light. Both are the results of adding nodes to the scene graph for the virtual world. The
addition of a sound node can be accomplished by the abstract Sound class, under which
there are three subclasses on BackgroundSound, PointSound, and ConeSound (Osawa,
Asai, Takase, & Saito, 2001).
Multiple sound sources, each with a reference sound file and associated methods for
control and activation, can be included in the scene graph. The relevant sound will become
audible whenever the scheduling bound associated with the sound node intersects the
activation volume of the listener.
Search WWH ::

Custom Search