public class SoundPlayer
extends java.lang.Object
Constructor and Description |
---|
SoundPlayer()
Creates a SoundPlayer which can have a Sound placed in it for audio playback.
|
SoundPlayer(Sound s)
Creates a SoundPlayer with a Sound that can be played.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the SoundPlayer and frees resources when the user presses Close.
|
Sound |
getSound()
Returns the Sound in the SoundPlayer.
|
void |
hide()
Makes the SoundPlayer invisible, so that it can not be seen on the desktop.
|
void |
placeSound(Sound s)
Places the Sound object into the sound player on the SoundPlayer.
|
void |
setSound(Sound s)
Deprecated.
use placeSound(Sound s) instead
|
void |
show()
Makes the SoundPlayer visible, so that it can be seen on the desktop.
|
void |
waitForUser()
Waits for the user to finish using the SoundPlayer and press OK.
|
public SoundPlayer()
public SoundPlayer(Sound s)
s
- the Sound to be played.public void setSound(Sound s)
s
- The Sound object to go into the playerpublic void placeSound(Sound s)
s
- The Sound object to go into the playerpublic Sound getSound()
public void show()
public void hide()
public void waitForUser()
public void close()