Class symantec.itools.multimedia.SoundPlayer
All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.multimedia.SoundPlayer
Object
|
+----symantec.itools.multimedia.SoundPlayer
- public class SoundPlayer
- extends Object
- implements Serializable
SoundPlayer component.
This component allows the playing of a list of sound clips
either serially or simultaneously. The sound information is
8-bit 8000hz u-law encoded data.
- Version:
- 1.1, July 25, 1997
- Author:
- Symantec
-
INFINITE
- A constant specifying that the sound should run forever.
-
symantec.itools.multimedia.SoundPlayer()
- Constructs a SoundPlayer.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener for all event changes.
-
addStringURL(String)
- Appends the sound clip data at the specified URL to the current list
of sound clips.
-
addURL(URL)
- Appends the sound clip data at the specified URL to the current list
of sound clips.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a vetoable listener for all event changes.
-
getRepeat()
- Gets the number of times the list of sound clips is played.
-
getSyncMode()
-
-
getURLList()
- Gets the URL of each sound clip.
-
isSyncMode()
- Returns the number of times the list of sound clips is played.
-
play()
- Starts playing the sound clips.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a listener for all event changes.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable listener for all event changes.
-
setRepeat(int)
- Sets the number of times the list of sound clips is played.
-
setSyncMode(boolean)
- Sets whether to play the sound clips one after the other,
or all simultaneously.
-
setURLList(URL[])
- Initializes the list of sound clips using the given list of sound clip
data URLs.
-
stop()
- Immediately stops the playing of sound clips.
-
stop(int)
- Stops the playing of sound clips after the specified number of
milliseconds.
INFINITE
public static final int INFINITE
- A constant specifying that the sound should run forever.
Use with setRepeat().
- See Also:
- setRepeat
SoundPlayer
public SoundPlayer()
- Constructs a SoundPlayer.
By default the sound clips will play serially (sync mode true),
and will play only once (repeat count == 1).
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
- Adds a listener for all event changes.
- Parameters:
- PropertyChangeListener - listener the listener to add.
- See Also:
- removePropertyChangeListener
addStringURL
public void addStringURL(String url)
- Appends the sound clip data at the specified URL to the current list
of sound clips.
The specified file contains u-law encoded 8-bit 8000hz data.
- Parameters:
- url - the URL of a file containing sound clip data
addURL
public void addURL(URL u)
- Appends the sound clip data at the specified URL to the current list
of sound clips.
The specified file contains u-law encoded 8-bit 8000hz data.
- Parameters:
- u - the URL of a file containing sound clip data
addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener listener)
- Adds a vetoable listener for all event changes.
- Parameters:
- VetoableChangeListener - listener the listener to add.
- See Also:
- removeVetoableChangeListener
getRepeat
public int getRepeat()
- Gets the number of times the list of sound clips is played.
- See Also:
- setRepeat(int)
getSyncMode
public boolean getSyncMode()
- Note: getSyncMode() is deprecated.
-
- See Also:
- isSyncMode
getURLList
public java.net.URL[] getURLList()
- Gets the URL of each sound clip.
- See Also:
- setURLList
isSyncMode
public boolean isSyncMode()
- Returns the number of times the list of sound clips is played.
play
public void play()
- Starts playing the sound clips.
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a listener for all event changes.
- Parameters:
- PropertyChangeListener - listener the listener to remove.
- See Also:
- addPropertyChangeListener
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable listener for all event changes.
- Parameters:
- VetoableChangeListener - listener the listener to remove.
- See Also:
- addVetoableChangeListener
setRepeat
public void setRepeat(int c) throws PropertyVetoException
- Sets the number of times the list of sound clips is played.
- Parameters:
- c - the number of times to play the list of sound clips,
or INFINITE to keep playing forever
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- See Also:
- getRepeat
setSyncMode
public void setSyncMode(boolean newSyncMode) throws PropertyVetoException
- Sets whether to play the sound clips one after the other,
or all simultaneously.
- Parameters:
- newSyncMode - true to play the sound clips serially,
false to play them all simultaneously
- Throws: PropertyVetoException
- if the specified property value is unacceptable
setURLList
public void setURLList(URL[] list) throws PropertyVetoException
- Initializes the list of sound clips using the given list of sound clip
data URLs. Any previously existing sound clip information is lost.
The files specified by the URLs contain u-law encoded 8-bit 8000hz data.
- Parameters:
- list - a list of URLs of files containing sound clip data
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- See Also:
- getURLList
stop
public void stop()
- Immediately stops the playing of sound clips.
stop
public void stop(int delay)
- Stops the playing of sound clips after the specified number of
milliseconds.
- Parameters:
- #delay - the number of milliseconds to wait before stopping
sound play
All Packages Class Hierarchy This Package Previous Next Index