javax.media.j3d
Class SoundSchedulerAtom

java.lang.Object
  extended by javax.media.j3d.SoundSchedulerAtom

 class SoundSchedulerAtom
extends java.lang.Object

A SoundSchedulerAtom is the smallest object representing a Sound within SoundScheduler. This class contains View-Depedent fields. Some of these fields may appear to over lap fields in the Sound Node classes, but remember that the Sound Node fields are universal, user-defined fields and do not take into account specific Audio Device view-dependent conditions.


Field Summary
(package private)  boolean activated
          Is this sound in an active scheduling region
(package private)  long attackLength
           
(package private)  int attribsDirty
          attribsDirty bit field This bitmask is set when sound node attribute is changed by the user.
(package private) static int COMPLETE
           
(package private) static boolean debugFlag
           
(package private) static int DO_NOTHING
          Pending action for this sound determined by the SoundScheduler
(package private)  int enabled
           
(package private)  long endTime
           
(package private) static boolean internalErrors
           
(package private) static int LEAVE_AUDIBLE
           
(package private) static int LEAVE_OFF
           
(package private) static int LEAVE_PAUSED
           
(package private) static int LEAVE_SILENT
           
(package private)  int loadStatus
           
(package private)  long loopLength
           
(package private)  long loopStartOffset
           
(package private) static int MAKE_AUDIBLE
           
(package private) static int MAKE_SILENT
           
(package private)  int muted
           
(package private) static int MUTED
           
(package private)  int numberChannels
           
(package private) static int OFF
          Switch for turning sound on or off while the sound is "active"
(package private) static int ON
           
(package private) static int PAUSE_AUDIBLE
           
(package private) static int PAUSE_SILENT
           
(package private)  int paused
           
(package private) static int PAUSED
           
(package private) static int PENDING_MUTE
           
(package private) static int PENDING_OFF
           
(package private) static int PENDING_ON
           
(package private) static int PENDING_PAUSE
           
(package private) static int PENDING_UNMUTE
           
(package private) static int PENDING_UNPAUSE
           
(package private)  boolean playing
           
(package private)  long releaseLength
           
(package private) static int RESTART_AUDIBLE
           
(package private) static int RESTART_SILENT
           
(package private) static int RESUME_AUDIBLE
           
(package private) static int RESUME_SILENT
           
(package private)  int sampleId
          Identifiers of sample associated with sound source
(package private)  long sampleLength
           
(package private)  int schedulingAction
           
(package private)  SoundRetained sound
          The mirror sound node component of this sound scheduler atom
(package private) static int SOUND_AUDIBLE
           
(package private) static int SOUND_COMPLETE
           
(package private) static int SOUND_OFF
          This status flag is used for sound scheduling
(package private) static int SOUND_PAUSED
           
(package private) static int SOUND_SILENT
           
(package private)  MediaContainer soundData
          MediaContainer currently loaded for this atom
(package private)  SoundScheduler soundScheduler
          reference to Sound Scheduler this atom is associated with
(package private) static int START_AUDIBLE
           
(package private) static int START_SILENT
           
(package private)  long startTime
           
(package private)  int stateDirty
          stateDirty bit field This bitmask is set when scene graph state is changed.
(package private)  int status
           
(package private) static int TURN_OFF
           
(package private) static int UNMUTED
          Switch for muting and unmuting sound while it is playing
(package private) static int UNPAUSED
          Switch for pausing and unpausing sound while it is playing
(package private) static int UPDATE
           
 
Constructor Summary
SoundSchedulerAtom()
           
 
Method Summary
(package private)  int calcActiveSchedAction()
          calcActiveSchedAction() Calculate Sound Scheduler Action for Active sound (it's region intersects the viewPlatform).
(package private)  int calcInactiveSchedAction()
          calcInactiveSchedAction() Calculate Sound Scheduler action for Inactive sound A big switch testing various SoundRetained fields to determine what SoundScheduler action to perform when sound is inactive.
(package private)  void calculateEndTime()
          Calculate absolute time at which sample completes Checks playing flag denoting if sound is started already or not: false - calcalutes endTime in relation to startTime true - re-calculates endTime based on current position in loop portion of sample plus release length
(package private)  void clearAttribsDirtyFlag()
           
(package private)  void clearAttribsDirtyFlag(int bitFlag)
          Clear sound's dirty flag bit value.
(package private)  void clearStateDirtyFlag()
           
(package private)  void clearStateDirtyFlag(int bitFlag)
           
(package private)  void debugPrint(java.lang.String message)
           
(package private)  void enable(boolean enabled)
           
(package private)  void mute(boolean muted)
           
(package private)  void pause(boolean paused)
           
(package private)  void setAttribsDirtyFlag(int bitFlag)
          Set bit(s) in soundDirty field
(package private)  void setEnableState(int state)
           
(package private)  void setMuteState(int state)
           
(package private)  void setPauseState(int state)
           
(package private)  void setStateDirtyFlag(int bitFlag)
           
(package private)  boolean testDirtyFlag(int field, int bitFlag)
          Test sound's dirty flag bit(s)
(package private)  boolean testDirtyFlags()
          Test sound's dirty flags for ANY bits on
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sound

SoundRetained sound
The mirror sound node component of this sound scheduler atom


soundData

MediaContainer soundData
MediaContainer currently loaded for this atom


startTime

long startTime

endTime

long endTime

sampleLength

long sampleLength

loopStartOffset

long loopStartOffset

loopLength

long loopLength

attackLength

long attackLength

releaseLength

long releaseLength

loadStatus

int loadStatus

playing

boolean playing

numberChannels

int numberChannels

activated

boolean activated
Is this sound in an active scheduling region


OFF

static final int OFF
Switch for turning sound on or off while the sound is "active"

See Also:
Constant Field Values

ON

static final int ON
See Also:
Constant Field Values

PENDING_ON

static final int PENDING_ON
See Also:
Constant Field Values

PENDING_OFF

static final int PENDING_OFF
See Also:
Constant Field Values

enabled

int enabled

UNMUTED

static final int UNMUTED
Switch for muting and unmuting sound while it is playing

See Also:
Constant Field Values

MUTED

static final int MUTED
See Also:
Constant Field Values

PENDING_UNMUTE

static final int PENDING_UNMUTE
See Also:
Constant Field Values

PENDING_MUTE

static final int PENDING_MUTE
See Also:
Constant Field Values

muted

int muted

UNPAUSED

static final int UNPAUSED
Switch for pausing and unpausing sound while it is playing

See Also:
Constant Field Values

PAUSED

static final int PAUSED
See Also:
Constant Field Values

PENDING_UNPAUSE

static final int PENDING_UNPAUSE
See Also:
Constant Field Values

PENDING_PAUSE

static final int PENDING_PAUSE
See Also:
Constant Field Values

paused

int paused

DO_NOTHING

static final int DO_NOTHING
Pending action for this sound determined by the SoundScheduler

See Also:
Constant Field Values

LEAVE_OFF

static final int LEAVE_OFF
See Also:
Constant Field Values

LEAVE_SILENT

static final int LEAVE_SILENT
See Also:
Constant Field Values

LEAVE_AUDIBLE

static final int LEAVE_AUDIBLE
See Also:
Constant Field Values

LEAVE_PAUSED

static final int LEAVE_PAUSED
See Also:
Constant Field Values

RESTART_AUDIBLE

static final int RESTART_AUDIBLE
See Also:
Constant Field Values

START_AUDIBLE

static final int START_AUDIBLE
See Also:
Constant Field Values

RESTART_SILENT

static final int RESTART_SILENT
See Also:
Constant Field Values

START_SILENT

static final int START_SILENT
See Also:
Constant Field Values

MAKE_AUDIBLE

static final int MAKE_AUDIBLE
See Also:
Constant Field Values

MAKE_SILENT

static final int MAKE_SILENT
See Also:
Constant Field Values

PAUSE_AUDIBLE

static final int PAUSE_AUDIBLE
See Also:
Constant Field Values

PAUSE_SILENT

static final int PAUSE_SILENT
See Also:
Constant Field Values

RESUME_AUDIBLE

static final int RESUME_AUDIBLE
See Also:
Constant Field Values

RESUME_SILENT

static final int RESUME_SILENT
See Also:
Constant Field Values

TURN_OFF

static final int TURN_OFF
See Also:
Constant Field Values

UPDATE

static final int UPDATE
See Also:
Constant Field Values

COMPLETE

static final int COMPLETE
See Also:
Constant Field Values

schedulingAction

int schedulingAction

SOUND_OFF

static final int SOUND_OFF
This status flag is used for sound scheduling

See Also:
Constant Field Values

SOUND_AUDIBLE

static final int SOUND_AUDIBLE
See Also:
Constant Field Values

SOUND_SILENT

static final int SOUND_SILENT
See Also:
Constant Field Values

SOUND_PAUSED

static final int SOUND_PAUSED
See Also:
Constant Field Values

SOUND_COMPLETE

static final int SOUND_COMPLETE
See Also:
Constant Field Values

status

int status

attribsDirty

int attribsDirty
attribsDirty bit field This bitmask is set when sound node attribute is changed by the user.


stateDirty

int stateDirty
stateDirty bit field This bitmask is set when scene graph state is changed.


sampleId

int sampleId
Identifiers of sample associated with sound source


soundScheduler

SoundScheduler soundScheduler
reference to Sound Scheduler this atom is associated with


debugFlag

static final boolean debugFlag
See Also:
Constant Field Values

internalErrors

static final boolean internalErrors
See Also:
Constant Field Values
Constructor Detail

SoundSchedulerAtom

SoundSchedulerAtom()
Method Detail

calculateEndTime

void calculateEndTime()
Calculate absolute time at which sample completes Checks playing flag denoting if sound is started already or not: false - calcalutes endTime in relation to startTime true - re-calculates endTime based on current position in loop portion of sample plus release length


enable

void enable(boolean enabled)

mute

void mute(boolean muted)

pause

void pause(boolean paused)

setEnableState

void setEnableState(int state)

setMuteState

void setMuteState(int state)

setPauseState

void setPauseState(int state)

calcActiveSchedAction

int calcActiveSchedAction()
calcActiveSchedAction() Calculate Sound Scheduler Action for Active sound (it's region intersects the viewPlatform). A big switch testing various SoundRetained fields to determine what SoundScheduler action to perform when sound is Active set sound active flag true switch on enable value, to set pending scheduling action depending on continuous and release flags and sound status


calcInactiveSchedAction

int calcInactiveSchedAction()
calcInactiveSchedAction() Calculate Sound Scheduler action for Inactive sound A big switch testing various SoundRetained fields to determine what SoundScheduler action to perform when sound is inactive. set sound active flag false switch on enable value, to set pending scheduling action depending on continuous and release flags and sound status


debugPrint

void debugPrint(java.lang.String message)

setAttribsDirtyFlag

void setAttribsDirtyFlag(int bitFlag)
Set bit(s) in soundDirty field

Parameters:
binary - flag denotes bits to set ON

setStateDirtyFlag

void setStateDirtyFlag(int bitFlag)

clearAttribsDirtyFlag

void clearAttribsDirtyFlag(int bitFlag)
Clear sound's dirty flag bit value.

Parameters:
binary - flag denotes bits to set OFF

clearAttribsDirtyFlag

void clearAttribsDirtyFlag()

clearStateDirtyFlag

void clearStateDirtyFlag(int bitFlag)

clearStateDirtyFlag

void clearStateDirtyFlag()

testDirtyFlag

boolean testDirtyFlag(int field,
                      int bitFlag)
Test sound's dirty flag bit(s)

Parameters:
field - denotes which bitmask to set into
binary - flag denotes bits to set Test
Returns:
true if bit(s) in bitFlag are set dirty (on)

testDirtyFlags

boolean testDirtyFlags()
Test sound's dirty flags for ANY bits on

Returns:
true if any bit in bitFlag is flipped on


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.