Java 3D has a set of leaf nodes to add sounds: |
Sound |
BackgroundSound |
PointSound |
ConeSound |
Soundscape |
AuralAttributes |
MediaContainer |
PointSound ouch = new PointSound( ); |
ouch.setPosition( 0.0, 3.0, 8.0 ); |
ouch.setSoundData( ouchSound ); |
ouch.setLoop( 1 ); |