All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.Sound

java.lang.Object
   |
   +----java.media.j3d.SceneGraphObject
           |
           +----java.media.j3d.Node
                   |
                   +----java.media.j3d.Leaf
                           |
                           +----java.media.j3d.Sound

public abstract class Sound
extends Leaf
Sound is an abstract class that contains instance varables common to all sounds.


Variable Index

 o ALLOW_CONT_PLAY_READ
Specifies that this node allows access to its object's continuous play information.
 o ALLOW_CONT_PLAY_WRITE
Specifies that this node allows writing to its object's continuous play information.
 o ALLOW_DURATION_READ
Specifies that this node allows access to its object's sound duration information.
 o ALLOW_INITIAL_GAIN_READ
Specifies that this node allows access to its object's initial gain information.
 o ALLOW_INITIAL_GAIN_WRITE
Specifies that this node allows writing to its object's initial gain information.
 o ALLOW_IS_PLAYING_READ
Specifies that this node allows access to its object's sound playing information.
 o ALLOW_LOOP_READ
Specifies that this node allows access to its object's loop information.
 o ALLOW_LOOP_WRITE
Specifies that this node allows writing to its object's loop information.
 o ALLOW_RELEASE_READ
Specifies that this node allows access to its object's release flag information.
 o ALLOW_RELEASE_WRITE
Specifies that this node allows writing to its object's release flag information.
 o ALLOW_SCHEDULING_BOUNDS_READ
Specifies that this node allows read access to its scheduling bounds information.
 o ALLOW_SCHEDULING_BOUNDS_WRITE
Specifies that this node allows write access to its scheduling bounds information.
 o ALLOW_SOUND_DATA_READ
Specifies that this node allows access to its object's sound data information.
 o ALLOW_SOUND_DATA_WRITE
Specifies that this node allows writing to its object's sound data information.
 o ALLOW_SOUND_ON_READ
Specifies that this node allows access to its object's sound on information.
 o ALLOW_SOUND_ON_WRITE
Specifies that this node allows writing to its object's sound on information.

Constructor Index

 o Sound()
Constructs and initializes a new Sound node using defaults.
 o Sound(MediaContainer, float)
Constructs and initializes a new Sound node using specified only sound data and overall gain scale factor parameters.
 o Sound(MediaContainer, float, int, boolean, boolean, boolean, Bounds)
Constructs and initializes a new Sound node using specified parameters.

Method Index

 o getContinuousEnable()
Retrieves sound's continuous play flag.
 o getDuration()
Get the Sound's duration
 o getEnable()
Retrieves sound's enabled flag.
 o getInitialGain()
Get the overall gain applied to the sound data associated with source.
 o getLoop()
Retrieves loop count for this sound
 o getReleaseEnable()
Retrieves release flag for sound associated with sound.
 o getSchedulingBoundingLeaf()
Retrieves the Sound node's scheduling bounding leaf.
 o getSchedulingBounds()
Retrieves the Sound node's scheduling bounds.
 o getSoundData()
Retrieves description/data associated with this sound source.
 o isPlaying()
Retrieves sound's play status.
 o setContinuousEnable(boolean)
Enables or disables continuous play flag.
 o setEnable(boolean)
Enable or disable sound.
 o setInitialGain(float)
Set the overall gain scale factor applied to data associated with this source.
 o setLoop(int)
Sets a sound's loop count.
 o setReleaseEnable(boolean)
Enables or disables the release flag for the sound associated with this sound.
 o setSchedulingBoundingLeaf(BoundingLeaf)
Set the Sound's scheduling region to the specified bounding leaf.
 o setSchedulingBounds(Bounds)
Set the Sound's scheduling region to the specified bounds.
 o setSoundData(MediaContainer)
Sets fields that define the sound source data of this node.

Variables

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

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

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

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

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

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

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

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

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

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

 o ALLOW_SOUND_ON_READ
 public static final int ALLOW_SOUND_ON_READ
Specifies that this node allows access to its object's sound on information.

 o ALLOW_SOUND_ON_WRITE
 public static final int ALLOW_SOUND_ON_WRITE
Specifies that this node allows writing to its object's sound on information.

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

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

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

 o ALLOW_IS_PLAYING_READ
 public static final int ALLOW_IS_PLAYING_READ
Specifies that this node allows access to its object's sound playing information.

Constructors

 o Sound
 public Sound()
Constructs and initializes a new Sound node using defaults.

 o Sound
 public Sound(MediaContainer soundData,
              float initialGain)
Constructs and initializes a new Sound node using specified only sound data and overall gain scale factor parameters.

Parameters:
soundData - description of JMF source data used by this sound source
initialGain - overall amplitude scale factor applied to sound source
 o Sound
 public Sound(MediaContainer soundData,
              float initialGain,
              int loopCount,
              boolean release,
              boolean continuous,
              boolean enable,
              Bounds region)
Constructs and initializes a new Sound node using specified parameters.

Parameters:
soundData - description of JMF source data used by this sound source
initialGain - overall amplitude scale factor applied to sound source
loopCount - number of times sound is looped when played
release - flag denoting sound is to be played to the end when stopped
continuous - denotes that sound silently plays when disabled
enable - sound switched on/off
region - scheduling bounds

Methods

 o setSoundData
 public void setSoundData(MediaContainer soundData)
Sets fields that define the sound source data of this node.

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

Parameters:
soundData - description of JMF source data used by this sound source
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setInitialGain
 public void setInitialGain(float amplitude)
Set the overall gain scale factor applied to data associated with this source.

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

Returns:
overall gain scale factor applied to sound source data.
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setLoop
 public final void setLoop(int loopCount)
Sets a sound's loop count.

Parameters:
loopCount - number of times sound is looped during play
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getLoop
 public final int getLoop()
Retrieves loop count for this sound

Returns:
loop count
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setReleaseEnable
 public final void setReleaseEnable(boolean state)
Enables or disables the release flag for the sound associated with this sound.

Parameters:
state - release flag
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getReleaseEnable
 public final boolean getReleaseEnable()
Retrieves release flag for sound associated with sound.

Returns:
sound's release flag
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setContinuousEnable
 public final void setContinuousEnable(boolean state)
Enables or disables continuous play flag.

Parameters:
state - denotes if deactivated sound silently continues playing
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getContinuousEnable
 public final boolean getContinuousEnable()
Retrieves sound's continuous play flag.

Returns:
flag denoting if deactivated sound silently continues playing
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setEnable
 public void setEnable(boolean state)
Enable or disable sound.

Parameters:
state - enable (on/off) flag denotes if active sound is heard
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getEnable
 public final boolean getEnable()
Retrieves sound's enabled flag.

Returns:
sound enabled flag
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setSchedulingBounds
 public final void setSchedulingBounds(Bounds region)
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 scheduling region.
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getSchedulingBounds
 public final Bounds getSchedulingBounds()
Retrieves the Sound node's scheduling bounds.

Returns:
this Sound's scheduling bounds information
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setSchedulingBoundingLeaf
 public final void setSchedulingBoundingLeaf(BoundingLeaf region)
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 Sound node's new scheduling region.
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getSchedulingBoundingLeaf
 public final BoundingLeaf getSchedulingBoundingLeaf()
Retrieves the Sound node's scheduling bounding leaf.

Returns:
this Sound's scheduling bounding leaf information
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getDuration
 public final long getDuration()
Get the Sound's duration

Returns:
this Sound's duration in milliseconds including repeated loops
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o isPlaying
 public final boolean isPlaying()
Retrieves sound's play status.

Returns:
flag denoting if sound is playing or not
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph

All Packages  Class Hierarchy  This Package  Previous  Next  Index