Java Doc for Sound.java in  » 6.0-JDK-Modules » java-3d » javax » media » j3d » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » javax.media.j3d 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.j3d.SceneGraphObject
      javax.media.j3d.Node
         javax.media.j3d.Leaf
            javax.media.j3d.Sound

All known Subclasses:   javax.media.j3d.PointSound,  javax.media.j3d.BackgroundSound,
Sound
abstract public class Sound extends Leaf (Code)
Sound node is an abstract class that defines the properties common to all sound sources. A scene graph can contain multiple sounds. Associated with each sound source are: a reference to sound data, an amplitude scale factor, a release flag denoting that the sound associated with this node is to play to end when it is disabled, the number of times sound is to be repeated, the sound's state (on or off), a scheduling region, and a flag denoting if the sound is to continue playing "silently" even while it is inactive. Whenever the listener is within a sound node's scheduling bounds this sound is potentially audible.

Sound Data

    Associated with each Sound node is a MediaContainer which includes audio data and information about this data. This data can be cached (buffered) or non-cached (unbuffered or streaming). If an AudioDevice has been attached to the PhysicalEnvironment, the sound data is made ready to begin playing. Certain functionality can not be applied to true streaming sound data:

    1) querying the sound's duration (Sound.DURATION_UNKNOWN will be returned),
    2) looping over a range of the streaming data; and
    3) restart a previously played portion of the data.

    Depending on the implementation of the AudioDevice used, streamed, non- cached data may not be fully spatialized.

Initial Gain

    This gain is a scale factor applied to the sound data associated with this sound source to increase or decrease its overall amplitude.

Loop

    Data for non-streaming sound (such as a sound sample) can contain two loop points marking a section of the data that is to be looped a specific number of times. Thus sound data can be divided into three segments: the attack (before the begin loop point), the sustain (between the begin and end loop points), and the release (after the end loop point). If there are no loop begin and end points defined as part of the sound data, the begin loop point is set at the beginning of the sound data, and the end loop point at the end of the sound data. If this is the case, looping the sound would mean repeating the whole sound. However, these allow a portion in the middle of the sound to be looped.

    A sound can be looped a specified number of times after it is activated before it is completed. The loop count value explicitly sets the number of times the sound is looped. Any non-negative number is a valid value. A value of zero denotes that the looped section is not repeated, but is played only once. A value of -1 denotes that the loop is repeated indefinitely.

    Changing loop count of a sound after the sound has been started will not dynamically affect the loop count currently used by the sound playing. The new loop count will be used the next time the sound is enabled.

Release Flag

    When a sound is disabled, its playback would normally stop immediately no matter what part of the sound data was currently being played. By setting the Release Flag to true for nodes with non-streaming sound data, the sound is allowed to play from its current position in the sound data to the end of the data (without repeats), thus playing the release portion of the sound before stopping.

Continuous Flag

    For some applications, it's useful to turn a sound source "off" but to continue "silently" playing the sound so that when it is turned back "on" the sound picks up playing in the same location (over time) as it would have been if the sound had never been disabled (turned off). Setting the Continuous flag true causes the sound renderer to keep track of where (over time) the sound would be playing even when the sound is disabled.

Enable Sound

    When enabled, the sound source is started playing and thus can potentially be heard, depending on its activation state, gain control parameters, continuation state, and spatialization parameters. If the continuous state is true, even if the sound is not active, enabling the sound starts the sound silently "playing," so that when the sound is activated, the sound is (potentially) heard from somewhere in the middle of the sound data. Activation state can change from active to inactive any number of times without stopping or starting the sound. To re-start a sound at the beginning of its data, re-enable the sound by calling setEnable with true.

    Setting the enable flag to true during construction acts as a request to start the sound playing "as soon as it can" be started. This could be close to immediately in limited cases, but several conditions, detailed below, must be met for a sound to be ready to be played.

Mute Sound

    When the mute state is set true, a playing sound is made to play silently.

Pause Sound

    When the pause state is set true, a playing sound is paused.

    Setting the enable flag to true during construction acts as a request to start the sound playing "as soon as it can" be started. This could be close to immediately in limited cases, but several conditions, detailed below, must be met for a sound to be ready to be played.

Scheduling Bounds

    A Sound is scheduled for activation when its scheduling region intersects the ViewPlatform's activation volume. This is used when the scheduling bounding leaf is set to null.

Scheduling Bounding Leaf

    When set to a value other than null, the scheduling bounding leaf region overrides the scheduling bounds object.

Prioritize Sound

    Sound Priority is used to rank concurrently playing sounds in order of importance during playback. When more sounds are started than the AudioDevice can handle, the sound node with the lowest priority ranking is deactivated (but continues playing silently). If a sound is deactivated (due to a sound with a higher priority being started), it is automatically re-activated when resources become available (e.g., when a sound with a higher priority finishes playing), or when the ordering of sound nodes are changed due to a change in a sound node's priority.

    Sounds with a lower priority than sound that can not be played due to lack of channels will be played. For example, assume we have eight channels available for playing sounds. After ordering four sounds, we begin playing them in order, checking if the number of channels required to play a given sound are actually available before the sound is played. Furthermore, say the first sound needs three channels to play, the second sound needs four channels, the third sound needs three channels and the fourth sound needs only one channel. The first and second sounds can be started because they require seven of the eight available channels. The third sound can not be audibly started because it requires three channels and only one is still available. Consequently, the third sound starts playing 'silently.' The fourth sound can and will be started since it only requires one channel. The third sound will be made audible when three channels become available (i.e., when the first or second sound finishes playing).

    Sounds given the same priority are ordered randomly. If the application wants a specific ordering, it must assign unique priorities to each sound.

    Methods to determine what audio output resources are required for playing a Sound node on a particular AudioDevice and to determine the currently available audio output resources are described in the AudioDevice class.

Duration

    Each sound has a length of time in milliseconds that it can run (including repeating loop section) if it plays to completion. If the sound media type is streaming, or if the sound is looped indefinitely, then a value of -1 (implying infinite length) is returned.

Number of Channels used on Audio Device to Play Sound

    When a sound is started, it could use more than one channel on the selected AudioDevice it is to be played on. The number of Audio Device channels currently used for a sound can be queried using getNumberOfChannelsUsed().

Preparing a Sound to be Played

    Sound data associated with a Sound node, either during construction (when the MediaContainer is passed into the constructor as a parameter) or by calling setSoundData(), it can be prepared to begin playing only after the following conditions are satisfied:

    1) the Sound node has non-null sound data associated with it
    2) the Sound node is live
    3) there is an active View in the Universe and
    4) there is an initialized AudioDevice associated with the PhysicalEnvironment.

    Depending on the type of MediaContainer the sound data is and on the implementation of the AudioDevice used, sound data preparation could consist of opening, attaching, loading, or copying into memory the associated sound data. The query method, isReady() returns true when the sound is fully preprocessed so that it is playable (audibly if active, silently if not active).

Playing Status

    A sound source will not be heard unless it is:

    1) enabled/started
    2) activated
    3) not muted
    4) not paused

    While these conditions are meet, the sound is potentially audible and the method isPlaying() will return a status of true.

    isPlaying returns false but isPlayingSilently returns true if a sound:

    1) is enabled before it is activated; it is begun playing silently.
    2) is enabled then deactivated while playing; it continues playing silently
    3) is enabled while it mute state is true

    When the sound finishes playing it's sound data (including all loops), it is implicitly disabled.


See Also:   AudioDevice



Field Summary
final public static  intALLOW_CHANNELS_USED_READ
     Specifies that this node allows access to its number of channels used by this sound.
final public static  intALLOW_CONT_PLAY_READ
     Specifies that this node allows access to its object's continuous play information.
final public static  intALLOW_CONT_PLAY_WRITE
     Specifies that this node allows writing to its object's continuous play information.
final public static  intALLOW_DURATION_READ
     Specifies that this node allows access to its object's sound duration information.
final public static  intALLOW_ENABLE_READ
     Specifies that this node allows access to its object's sound on information.
final public static  intALLOW_ENABLE_WRITE
     Specifies that this node allows writing to its object's sound on information.
final public static  intALLOW_INITIAL_GAIN_READ
     Specifies that this node allows access to its object's initial gain information.
final public static  intALLOW_INITIAL_GAIN_WRITE
     Specifies that this node allows writing to its object's initial gain information.
final public static  intALLOW_IS_PLAYING_READ
     Specifies that this node allows access to its object's sound audibly playing or playing silently status.
final public static  intALLOW_IS_READY_READ
     Specifies that this node allows access to its object's sound status denoting if it is ready to be played 'immediately'.
final public static  intALLOW_LOOP_READ
     Specifies that this node allows access to its object's loop information.
final public static  intALLOW_LOOP_WRITE
     Specifies that this node allows writing to its object's loop information.
final public static  intALLOW_MUTE_READ
     Specifies that this node allows access to its object's mute flag information.
final public static  intALLOW_MUTE_WRITE
     Specifies that this node allows writing to its object's mute flag information.
final public static  intALLOW_PAUSE_READ
     Specifies that this node allows access to its object's pause flag information.
final public static  intALLOW_PAUSE_WRITE
     Specifies that this node allows writing to its object's pause flag information.
final public static  intALLOW_PRIORITY_READ
     Specifies that this node allows read access to its priority order value.
final public static  intALLOW_PRIORITY_WRITE
     Specifies that this node allows write access to its priority order value.
final public static  intALLOW_RATE_SCALE_FACTOR_READ
     Specifies that this node allows access to its object's sample rate scale factor information.
final public static  intALLOW_RATE_SCALE_FACTOR_WRITE
     Specifies that this node allows writing to its object's sample rate scale factor information.
final public static  intALLOW_RELEASE_READ
     Specifies that this node allows access to its object's release flag information.
final public static  intALLOW_RELEASE_WRITE
     Specifies that this node allows writing to its object's release flag information.
final public static  intALLOW_SCHEDULING_BOUNDS_READ
     Specifies that this node allows read access to its scheduling bounds information.
final public static  intALLOW_SCHEDULING_BOUNDS_WRITE
     Specifies that this node allows write access to its scheduling bounds information.
final public static  intALLOW_SOUND_DATA_READ
     Specifies that this node allows access to its object's sound data information.
final public static  intALLOW_SOUND_DATA_WRITE
     Specifies that this node allows writing to its object's sound data information.
final public static  intDURATION_UNKNOWN
     Denotes that the sound's duration could not be calculated.
final public static  intINFINITE_LOOPS
     When used as a loop count sound will loop an infinite number of time until explicitly stopped (setEnabled(false)).
final public static  floatNO_FILTER
     Denotes that there is no filter value associated with object's distance or angular attenuation array.

Constructor Summary
public  Sound()
     Constructs and initializes a new Sound node using default parameters.
public  Sound(MediaContainer soundData, float initialGain)
     Constructs and initializes a new Sound node object using the provided data and gain parameter values, and defaults for all other fields.
public  Sound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority)
     Constructs and initializes a new Sound node using provided parameter values.
public  Sound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, float rateFactor)
     Constructs and initializes a new Sound node using provided parameter values.

Method Summary
 voidduplicateAttributes(Node originalNode, boolean forceDuplicate)
     Copies all Sound information from originalNode into the current node.
public  booleangetContinuousEnable()
     Retrieves sound's continuous play flag.
public  longgetDuration()
    
public  booleangetEnable()
     Retrieves sound's enabled flag.
public  floatgetInitialGain()
     Get the overall gain applied to the sound data associated with source.
public  intgetLoop()
    
public  booleangetMute()
     Retrieves sound Mute state.
public  intgetNumberOfChannelsUsed()
     Retrieves number of channels that are being used to render this sound on the audio device associated with the Virtual Universe's primary view.
public  intgetNumberOfChannelsUsed(View view)
     Retrieves number of channels that are being used to render this sound on the audio device associated with given view.
Parameters:
  view - the view on which to query the number of channels used.
public  booleangetPause()
     Retrieves the value of the Pause state flag.
public  floatgetPriority()
     Retrieves sound's priority value.
public  floatgetRateScaleFactor()
     Retrieves Sample Rate.
public  booleangetReleaseEnable()
     Retrieves the release flag for sound associated with sound.
public  BoundingLeafgetSchedulingBoundingLeaf()
     Retrieves the Sound node's scheduling bounding leaf.
public  BoundsgetSchedulingBounds()
     Retrieves the Sound node's scheduling bounds.
public  MediaContainergetSoundData()
     Retrieves description/data associated with this sound source.
public  booleanisPlaying()
     Retrieves sound's play status.
public  booleanisPlaying(View view)
     Retrieves sound's play status.
public  booleanisPlayingSilently()
     Retrieves sound's silent status.
public  booleanisPlayingSilently(View view)
     Retrieves sound's silent status.
public  booleanisReady()
     Retrieves sound's 'ready' status.
public  booleanisReady(View view)
     Retrieves sound's 'ready' status.
public  voidsetContinuousEnable(boolean state)
     Enables or disables continuous play flag.
public  voidsetEnable(boolean state)
     Enable or disable sound.
public  voidsetInitialGain(float amplitude)
     Set the overall gain scale factor applied to data associated with this source to increase or decrease its overall amplitude.
public  voidsetLoop(int loopCount)
     Sets a sound's loop count.
public  voidsetMute(boolean state)
     Set mute state flag.
public  voidsetPause(boolean state)
     Pauses or resumes (paused) playing sound.
public  voidsetPriority(float priority)
     Set sound's priority value.
public  voidsetRateScaleFactor(float scaleFactor)
     Sets Sample Rate.
public  voidsetReleaseEnable(boolean state)
     Enables or disables the release flag for the sound associated with this sound.
public  voidsetSchedulingBoundingLeaf(BoundingLeaf region)
     Set the Sound's scheduling region to the specified bounding leaf.
public  voidsetSchedulingBounds(Bounds region)
     Set the Sound's scheduling region to the specified bounds.
public  voidsetSoundData(MediaContainer soundData)
     Sets fields that define the sound source data of this node.
public  voidupdateNodeReferences(NodeReferenceTable referenceTable)
     Callback used to allow a node to check if any scene graph objects referenced by that node have been duplicated via a call to cloneTree. This method is called by cloneTree after all nodes in the sub-graph have been duplicated.

Field Detail
ALLOW_CHANNELS_USED_READ
final public static int ALLOW_CHANNELS_USED_READ(Code)
Specifies that this node allows access to its number of channels used by this sound.



ALLOW_CONT_PLAY_READ
final public static int ALLOW_CONT_PLAY_READ(Code)
Specifies that this node allows access to its object's continuous play information.



ALLOW_CONT_PLAY_WRITE
final public static int ALLOW_CONT_PLAY_WRITE(Code)
Specifies that this node allows writing to its object's continuous play information.



ALLOW_DURATION_READ
final public static int ALLOW_DURATION_READ(Code)
Specifies that this node allows access to its object's sound duration information.



ALLOW_ENABLE_READ
final public static int ALLOW_ENABLE_READ(Code)
Specifies that this node allows access to its object's sound on information.



ALLOW_ENABLE_WRITE
final public static int ALLOW_ENABLE_WRITE(Code)
Specifies that this node allows writing to its object's sound on information.



ALLOW_INITIAL_GAIN_READ
final public static int ALLOW_INITIAL_GAIN_READ(Code)
Specifies that this node allows access to its object's initial gain information.



ALLOW_INITIAL_GAIN_WRITE
final public static int ALLOW_INITIAL_GAIN_WRITE(Code)
Specifies that this node allows writing to its object's initial gain information.



ALLOW_IS_PLAYING_READ
final public static int ALLOW_IS_PLAYING_READ(Code)
Specifies that this node allows access to its object's sound audibly playing or playing silently status.



ALLOW_IS_READY_READ
final public static int ALLOW_IS_READY_READ(Code)
Specifies that this node allows access to its object's sound status denoting if it is ready to be played 'immediately'.



ALLOW_LOOP_READ
final public static int ALLOW_LOOP_READ(Code)
Specifies that this node allows access to its object's loop information.



ALLOW_LOOP_WRITE
final public static int ALLOW_LOOP_WRITE(Code)
Specifies that this node allows writing to its object's loop information.



ALLOW_MUTE_READ
final public static int ALLOW_MUTE_READ(Code)
Specifies that this node allows access to its object's mute flag information.
since:
   Java 3D 1.3



ALLOW_MUTE_WRITE
final public static int ALLOW_MUTE_WRITE(Code)
Specifies that this node allows writing to its object's mute flag information.
since:
   Java 3D 1.3



ALLOW_PAUSE_READ
final public static int ALLOW_PAUSE_READ(Code)
Specifies that this node allows access to its object's pause flag information.
since:
   Java 3D 1.3



ALLOW_PAUSE_WRITE
final public static int ALLOW_PAUSE_WRITE(Code)
Specifies that this node allows writing to its object's pause flag information.
since:
   Java 3D 1.3



ALLOW_PRIORITY_READ
final public static int ALLOW_PRIORITY_READ(Code)
Specifies that this node allows read access to its priority order value.



ALLOW_PRIORITY_WRITE
final public static int ALLOW_PRIORITY_WRITE(Code)
Specifies that this node allows write access to its priority order value.



ALLOW_RATE_SCALE_FACTOR_READ
final public static int ALLOW_RATE_SCALE_FACTOR_READ(Code)
Specifies that this node allows access to its object's sample rate scale factor information.
since:
   Java 3D 1.3



ALLOW_RATE_SCALE_FACTOR_WRITE
final public static int ALLOW_RATE_SCALE_FACTOR_WRITE(Code)
Specifies that this node allows writing to its object's sample rate scale factor information.
since:
   Java 3D 1.3



ALLOW_RELEASE_READ
final public static int ALLOW_RELEASE_READ(Code)
Specifies that this node allows access to its object's release flag information.



ALLOW_RELEASE_WRITE
final public static int ALLOW_RELEASE_WRITE(Code)
Specifies that this node allows writing to its object's release flag information.



ALLOW_SCHEDULING_BOUNDS_READ
final public static int ALLOW_SCHEDULING_BOUNDS_READ(Code)
Specifies that this node allows read access to its scheduling bounds information.



ALLOW_SCHEDULING_BOUNDS_WRITE
final public static int ALLOW_SCHEDULING_BOUNDS_WRITE(Code)
Specifies that this node allows write access to its scheduling bounds information.



ALLOW_SOUND_DATA_READ
final public static int ALLOW_SOUND_DATA_READ(Code)
Specifies that this node allows access to its object's sound data information.



ALLOW_SOUND_DATA_WRITE
final public static int ALLOW_SOUND_DATA_WRITE(Code)
Specifies that this node allows writing to its object's sound data information.



DURATION_UNKNOWN
final public static int DURATION_UNKNOWN(Code)
Denotes that the sound's duration could not be calculated. A fall back for getDuration of a non-cached sound.



INFINITE_LOOPS
final public static int INFINITE_LOOPS(Code)
When used as a loop count sound will loop an infinite number of time until explicitly stopped (setEnabled(false)).



NO_FILTER
final public static float NO_FILTER(Code)
Denotes that there is no filter value associated with object's distance or angular attenuation array.




Constructor Detail
Sound
public Sound()(Code)
Constructs and initializes a new Sound node using default parameters. The following defaults values are used:
    sound data: null
    initial gain: 1.0
    loop: 0
    release flag: false
    continuous flag: false
    enable flag: false
    scheduling bounds : null
    scheduling bounding leaf : null
    priority: 1.0
    rate scale factor: 1.0
    mute state: false
    pause state: false



Sound
public Sound(MediaContainer soundData, float initialGain)(Code)
Constructs and initializes a new Sound node object using the provided data and gain parameter values, and defaults for all other fields. This constructor implicitly loads the sound data associated with this node if the implementation uses sound caching.
Parameters:
  soundData - description of JMF source data used by this sound source
Parameters:
  initialGain - overall amplitude scale factor applied to sound source



Sound
public Sound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority)(Code)
Constructs and initializes a new Sound node using provided parameter values.
Parameters:
  soundData - description of JMF source data used by this sound source
Parameters:
  initialGain - overall amplitude scale factor applied to sound source
Parameters:
  loopCount - number of times sound is looped when played
Parameters:
  release - flag specifying whether the sound is to be playedto end when stopped
Parameters:
  continuous - flag specifying whether the sound silently playswhen disabled
Parameters:
  enable - flag specifying whether the sound is enabled
Parameters:
  region - scheduling bounds
Parameters:
  priority - defines playback priority if too many sounds started



Sound
public Sound(MediaContainer soundData, float initialGain, int loopCount, boolean release, boolean continuous, boolean enable, Bounds region, float priority, float rateFactor)(Code)
Constructs and initializes a new Sound node using provided parameter values.
Parameters:
  soundData - description of JMF source data used by this sound source
Parameters:
  initialGain - overall amplitude scale factor applied to sound source
Parameters:
  loopCount - number of times sound is looped when played
Parameters:
  release - flag specifying whether the sound is to be playedto end when stopped
Parameters:
  continuous - flag specifying whether the sound silently playswhen disabled
Parameters:
  enable - flag specifying whether the sound is enabled
Parameters:
  region - scheduling bounds
Parameters:
  priority - defines playback priority if too many sounds started
Parameters:
  rateFactor - defines playback sample rate scale factor
since:
   Java 3D 1.3




Method Detail
duplicateAttributes
void duplicateAttributes(Node originalNode, boolean forceDuplicate)(Code)
Copies all Sound information from originalNode into the current node. This method is called from the cloneNode method which is, in turn, called by the cloneTree method.


Parameters:
  originalNode - the original node to duplicate.
Parameters:
  forceDuplicate - when set to true, causes theduplicateOnCloneTree flag to be ignored. Whenfalse, the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied.
exception:
  RestrictedAccessException - if this object is part of a liveor compiled scenegraph.
See Also:   Node.duplicateNode
See Also:   Node.cloneTree
See Also:   NodeComponent.setDuplicateOnCloneTree




getContinuousEnable
public boolean getContinuousEnable()(Code)
Retrieves sound's continuous play flag. flag denoting if deactivated sound silently continues playing
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getDuration
public long getDuration()(Code)
Get the Sound's duration this Sound's duration in milliseconds including repeatedloops
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getEnable
public boolean getEnable()(Code)
Retrieves sound's enabled flag. sound enabled flag
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getInitialGain
public float getInitialGain()(Code)
Get the overall gain applied to the sound data associated with source. overall gain scale factor applied to sound source data.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getLoop
public int getLoop()(Code)
Retrieves loop count for this sound loop count
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getMute
public boolean getMute()(Code)
Retrieves sound Mute state. A return value of true does not imply that the sound has been started playing or is still playing silently. mute state flag
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.3



getNumberOfChannelsUsed
public int getNumberOfChannelsUsed()(Code)
Retrieves number of channels that are being used to render this sound on the audio device associated with the Virtual Universe's primary view. number of channels used by sound; returns 0 if not playing
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getNumberOfChannelsUsed
public int getNumberOfChannelsUsed(View view)(Code)
Retrieves number of channels that are being used to render this sound on the audio device associated with given view.
Parameters:
  view - the view on which to query the number of channels used. number of channels used by sound; returns 0 if not playing
exception:
  CapabilityNotSetException - if appropriate capability is
since:
   Java 3D 1.3
since:
   not set and this object is part of live or compiled scene graph



getPause
public boolean getPause()(Code)
Retrieves the value of the Pause state flag. A return value of true does not imply that the sound was started playing and then paused. pause state
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.3



getPriority
public float getPriority()(Code)
Retrieves sound's priority value. sound priority value
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getRateScaleFactor
public float getRateScaleFactor()(Code)
Retrieves Sample Rate. sample rate scale factor
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.3



getReleaseEnable
public boolean getReleaseEnable()(Code)
Retrieves the release flag for sound associated with sound. sound's release flag
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getSchedulingBoundingLeaf
public BoundingLeaf getSchedulingBoundingLeaf()(Code)
Retrieves the Sound node's scheduling bounding leaf. this Sound's scheduling bounding leaf information
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getSchedulingBounds
public Bounds getSchedulingBounds()(Code)
Retrieves the Sound node's scheduling bounds. this Sound's scheduling bounds information
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getSoundData
public MediaContainer getSoundData()(Code)
Retrieves description/data associated with this sound source. soundData description of JMF source data used by this sound source
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



isPlaying
public boolean isPlaying()(Code)
Retrieves sound's play status. If this sound is audibly playing on any initialized audio device, this method returns true. flag denoting if sound is playing (potentially audible) or not
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



isPlaying
public boolean isPlaying(View view)(Code)
Retrieves sound's play status. If this sound is audibly playing on the audio device associated with the given view, this method returns true.
Parameters:
  view - the view on which to query the isPlaying status. flag denoting if sound is playing (potentially audible) or not
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.3



isPlayingSilently
public boolean isPlayingSilently()(Code)
Retrieves sound's silent status. If this sound is silently playing on any initialized audio device, this method returns true. flag denoting if sound is silently playing (enabled but not active)
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



isPlayingSilently
public boolean isPlayingSilently(View view)(Code)
Retrieves sound's silent status. If this sound is silently playing on the audio device associated with the given view, this method returns true. The isPlayingSilently state is affected by enable, mute, and continuous states as well as active status of sound.
Parameters:
  view - the view on which to query the isPlayingSilently status. flag denoting if sound is silently playing (enabled but not active)
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.3



isReady
public boolean isReady()(Code)
Retrieves sound's 'ready' status. If this sound is fully prepared to begin playing (audibly or silently) on all initialized audio devices, this method returns true. flag denoting if sound is immediate playable or not
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



isReady
public boolean isReady(View view)(Code)
Retrieves sound's 'ready' status. If this sound is fully prepared to begin playing (audibly or silently) on the audio device associated with this view, this method returns true.
Parameters:
  view - the view on which to query the ready status. flag denoting if sound is immediate playable or not
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.3



setContinuousEnable
public void setContinuousEnable(boolean state)(Code)
Enables or disables continuous play flag.
Parameters:
  state - denotes if deactivated sound silently continues playing
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setEnable
public void setEnable(boolean state)(Code)
Enable or disable sound.
Parameters:
  state - enable (on/off) flag denotes if active sound is heard
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setInitialGain
public void setInitialGain(float amplitude)(Code)
Set the overall gain scale factor applied to data associated with this source to increase or decrease its overall amplitude.
Parameters:
  amplitude - (gain) scale factor
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setLoop
public void setLoop(int loopCount)(Code)
Sets a sound's loop count.
Parameters:
  loopCount - number of times sound is looped during play
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setMute
public void setMute(boolean state)(Code)
Set mute state flag. If the sound is playing it will be set to play silently
Parameters:
  state - flag
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.3



setPause
public void setPause(boolean state)(Code)
Pauses or resumes (paused) playing sound.
Parameters:
  state - pause flag
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.3



setPriority
public void setPriority(float priority)(Code)
Set sound's priority value.
Parameters:
  priority - value used to order sound's importance for playback.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setRateScaleFactor
public void setRateScaleFactor(float scaleFactor)(Code)
Sets Sample Rate. Changes (scales) the playback rate of a sound independent of Doppler rate changes - applied to ALL sound types. Affects device sample rate playback and thus affects both pitch and speed
Parameters:
  scaleFactor - %%% describe this.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.3



setReleaseEnable
public void setReleaseEnable(boolean state)(Code)
Enables or disables the release flag for the sound associated with this sound.
Parameters:
  state - release flag
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setSchedulingBoundingLeaf
public void setSchedulingBoundingLeaf(BoundingLeaf region)(Code)
Set the Sound's scheduling region to the specified bounding leaf. When set to a value other than null, this overrides the scheduling bounds object.
Parameters:
  region - the bounding leaf node used to specify the Soundnode's new scheduling region.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setSchedulingBounds
public void setSchedulingBounds(Bounds region)(Code)
Set the Sound's scheduling region to the specified bounds. This is used when the scheduling bounding leaf is set to null.
Parameters:
  region - the bounds that contains the Sound's new schedulingregion.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setSoundData
public void setSoundData(MediaContainer soundData)(Code)
Sets fields that define the sound source data of this node.
Parameters:
  soundData - description of JMF source data used by this sound source
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



updateNodeReferences
public void updateNodeReferences(NodeReferenceTable referenceTable)(Code)
Callback used to allow a node to check if any scene graph objects referenced by that node have been duplicated via a call to cloneTree. This method is called by cloneTree after all nodes in the sub-graph have been duplicated. The cloned Leaf node's method will be called and the Leaf node can then look up any object references by using the getNewObjectReference method found in the NodeReferenceTable object. If a match is found, a reference to the corresponding object in the newly cloned sub-graph is returned. If no corresponding reference is found, either a DanglingReferenceException is thrown or a reference to the original object is returned depending on the value of the allowDanglingReferences parameter passed in the cloneTree call.

NOTE: Applications should not call this method directly. It should only be called by the cloneTree method.
Parameters:
  referenceTable - a NodeReferenceTableObject that contains thegetNewObjectReference method needed to search fornew object instances.
See Also:   NodeReferenceTable
See Also:   Node.cloneTree
See Also:   DanglingReferenceException





Fields inherited from javax.media.j3d.Node
final public static int ALLOW_AUTO_COMPUTE_BOUNDS_READ(Code)(Java Doc)
final public static int ALLOW_AUTO_COMPUTE_BOUNDS_WRITE(Code)(Java Doc)
final public static int ALLOW_BOUNDS_READ(Code)(Java Doc)
final public static int ALLOW_BOUNDS_WRITE(Code)(Java Doc)
final public static int ALLOW_COLLIDABLE_READ(Code)(Java Doc)
final public static int ALLOW_COLLIDABLE_WRITE(Code)(Java Doc)
final public static int ALLOW_LOCALE_READ(Code)(Java Doc)
final public static int ALLOW_LOCAL_TO_VWORLD_READ(Code)(Java Doc)
final public static int ALLOW_PARENT_READ(Code)(Java Doc)
final public static int ALLOW_PICKABLE_READ(Code)(Java Doc)
final public static int ALLOW_PICKABLE_WRITE(Code)(Java Doc)
final public static int ENABLE_COLLISION_REPORTING(Code)(Java Doc)
final public static int ENABLE_PICK_REPORTING(Code)(Java Doc)

Methods inherited from javax.media.j3d.Node
final void checkDuplicateNode(Node originalNode, boolean forceDuplicate)(Code)(Java Doc)
void checkForCycle()(Code)(Java Doc)
public Node cloneNode(boolean forceDuplicate)(Code)(Java Doc)
public Node cloneTree()(Code)(Java Doc)
public Node cloneTree(boolean forceDuplicate)(Code)(Java Doc)
public Node cloneTree(boolean forceDuplicate, boolean allowDanglingReferences)(Code)(Java Doc)
public Node cloneTree(NodeReferenceTable referenceTable)(Code)(Java Doc)
public Node cloneTree(NodeReferenceTable referenceTable, boolean forceDuplicate)(Code)(Java Doc)
public Node cloneTree(NodeReferenceTable referenceTable, boolean forceDuplicate, boolean allowDanglingReferences)(Code)(Java Doc)
Node cloneTree(boolean forceDuplicate, Hashtable nodeHashtable)(Code)(Java Doc)
void duplicateAttributes(Node originalNode, boolean forceDuplicate)(Code)(Java Doc)
public void duplicateNode(Node originalNode, boolean forceDuplicate)(Code)(Java Doc)
public Bounds getBounds()(Code)(Java Doc)
public boolean getBoundsAutoCompute()(Code)(Java Doc)
public boolean getCollidable()(Code)(Java Doc)
public void getLocalToVworld(Transform3D t)(Code)(Java Doc)
public void getLocalToVworld(SceneGraphPath path, Transform3D t)(Code)(Java Doc)
public Locale getLocale()(Code)(Java Doc)
public Node getParent()(Code)(Java Doc)
public boolean getPickable()(Code)(Java Doc)
public void setBounds(Bounds bounds)(Code)(Java Doc)
public void setBoundsAutoCompute(boolean autoCompute)(Code)(Java Doc)
public void setCollidable(boolean collidable)(Code)(Java Doc)
public void setPickable(boolean pickable)(Code)(Java Doc)

Fields inherited from javax.media.j3d.SceneGraphObject
Hashtable nodeHashtable(Code)(Java Doc)
SceneGraphObjectRetained retained(Code)(Java Doc)

Methods inherited from javax.media.j3d.SceneGraphObject
final boolean capabilityBitsEmpty()(Code)(Java Doc)
final void checkForLiveOrCompiled()(Code)(Java Doc)
final public void clearCapability(int bit)(Code)(Java Doc)
final public void clearCapabilityIsFrequent(int bit)(Code)(Java Doc)
final void clearLive()(Code)(Java Doc)
void createRetained()(Code)(Java Doc)
protected void duplicateSceneGraphObject(SceneGraphObject originalNode)(Code)(Java Doc)
final public boolean getCapability(int bit)(Code)(Java Doc)
final public boolean getCapabilityIsFrequent(int bit)(Code)(Java Doc)
public String getName()(Code)(Java Doc)
String getNamePrefix()(Code)(Java Doc)
NodeComponent getNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate, Hashtable hashtable)(Code)(Java Doc)
public Object getUserData()(Code)(Java Doc)
final public boolean isCompiled()(Code)(Java Doc)
final public boolean isLive()(Code)(Java Doc)
final boolean isLiveOrCompiled()(Code)(Java Doc)
final public void setCapability(int bit)(Code)(Java Doc)
final public void setCapabilityIsFrequent(int bit)(Code)(Java Doc)
final void setCompiled()(Code)(Java Doc)
void setDefaultReadCapabilities(int[] bits)(Code)(Java Doc)
final void setLive()(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)
public void setUserData(Object userData)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void updateNodeReferences(NodeReferenceTable referenceTable)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.