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.
-
ALLOW_CONT_PLAY_READ
- Specifies that this node allows access to its object's continuous
play information.
-
ALLOW_CONT_PLAY_WRITE
- Specifies that this node allows writing to its object's continuous
play information.
-
ALLOW_DURATION_READ
- Specifies that this node allows access to its object's sound duration
information.
-
ALLOW_INITIAL_GAIN_READ
- Specifies that this node allows access to its object's initial gain
information.
-
ALLOW_INITIAL_GAIN_WRITE
- Specifies that this node allows writing to its object's initial gain
information.
-
ALLOW_IS_PLAYING_READ
- Specifies that this node allows access to its object's sound playing
information.
-
ALLOW_LOOP_READ
- Specifies that this node allows access to its object's loop
information.
-
ALLOW_LOOP_WRITE
- Specifies that this node allows writing to its object's loop
information.
-
ALLOW_RELEASE_READ
- Specifies that this node allows access to its object's release flag
information.
-
ALLOW_RELEASE_WRITE
- Specifies that this node allows writing to its object's release flag
information.
-
ALLOW_SCHEDULING_BOUNDS_READ
- Specifies that this node allows read access to its scheduling bounds
information.
-
ALLOW_SCHEDULING_BOUNDS_WRITE
- Specifies that this node allows write access to its scheduling bounds
information.
-
ALLOW_SOUND_DATA_READ
- Specifies that this node allows access to its object's sound data
information.
-
ALLOW_SOUND_DATA_WRITE
- Specifies that this node allows writing to its object's sound data
information.
-
ALLOW_SOUND_ON_READ
- Specifies that this node allows access to its object's sound on
information.
-
ALLOW_SOUND_ON_WRITE
- Specifies that this node allows writing to its object's sound on
information.
-
Sound()
- Constructs and initializes a new Sound node using defaults.
-
Sound(MediaContainer, float)
- Constructs and initializes a new Sound node using specified
only sound data and overall gain scale factor parameters.
-
Sound(MediaContainer, float, int, boolean, boolean, boolean, Bounds)
- Constructs and initializes a new Sound node using specified
parameters.
-
getContinuousEnable()
- Retrieves sound's continuous play flag.
-
getDuration()
- Get the Sound's duration
-
getEnable()
- Retrieves sound's enabled flag.
-
getInitialGain()
- Get the overall gain applied to the sound data associated with source.
-
getLoop()
- Retrieves loop count for this sound
-
getReleaseEnable()
- Retrieves release flag for sound associated with sound.
-
getSchedulingBoundingLeaf()
-
Retrieves the Sound node's scheduling bounding leaf.
-
getSchedulingBounds()
-
Retrieves the Sound node's scheduling bounds.
-
getSoundData()
- Retrieves description/data associated with this sound source.
-
isPlaying()
- Retrieves sound's play status.
-
setContinuousEnable(boolean)
- Enables or disables continuous play flag.
-
setEnable(boolean)
- Enable or disable sound.
-
setInitialGain(float)
- Set the overall gain scale factor applied to data associated with this
source.
-
setLoop(int)
- Sets a sound's loop count.
-
setReleaseEnable(boolean)
- Enables or disables the release flag for the sound associated with
this sound.
-
setSchedulingBoundingLeaf(BoundingLeaf)
- Set the Sound's scheduling region to the specified bounding leaf.
-
setSchedulingBounds(Bounds)
- Set the Sound's scheduling region to the specified bounds.
-
setSoundData(MediaContainer)
- Sets fields that define the sound source data of this node.
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.
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.
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.
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.
ALLOW_LOOP_READ
public static final int ALLOW_LOOP_READ
- Specifies that this node allows access to its object's loop
information.
ALLOW_LOOP_WRITE
public static final int ALLOW_LOOP_WRITE
- Specifies that this node allows writing to its object's loop
information.
ALLOW_RELEASE_READ
public static final int ALLOW_RELEASE_READ
- Specifies that this node allows access to its object's release flag
information.
ALLOW_RELEASE_WRITE
public static final int ALLOW_RELEASE_WRITE
- Specifies that this node allows writing to its object's release flag
information.
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.
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.
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.
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.
ALLOW_SCHEDULING_BOUNDS_READ
public static final int ALLOW_SCHEDULING_BOUNDS_READ
- Specifies that this node allows read access to its scheduling bounds
information.
ALLOW_SCHEDULING_BOUNDS_WRITE
public static final int ALLOW_SCHEDULING_BOUNDS_WRITE
- Specifies that this node allows write access to its scheduling bounds
information.
ALLOW_DURATION_READ
public static final int ALLOW_DURATION_READ
- Specifies that this node allows access to its object's sound duration
information.
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.
Sound
public Sound()
- Constructs and initializes a new Sound node using defaults.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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