Constructor and Description |
---|
StreamSound(URL dataURL,
long numBytesPerChannel,
Mixer mixer,
int id)
Construct a new StreamSound with the given data and Mixer which will
handle this StreamSound.
|
Modifier and Type | Method and Description |
---|---|
void |
play()
Plays this StreamSound.
|
void |
play(double volume)
Plays this StreamSound with a specified volume.
|
void |
play(double volume,
double pan)
Plays this MemSound with a specified volume and pan.
|
void |
stop()
Stops this StreamSound from playing.
|
void |
unload()
Unloads this StreamSound from the system.
|
public StreamSound(URL dataURL, long numBytesPerChannel, Mixer mixer, int id) throws IOException
dataURL
- URL of the temporary file containing audio datanumBytesPerChannel
- the total number of bytes for each channel in
the filemixer
- Mixer that will handle this StreamSoundid
- unique ID of this StreamSoundIOException
- if a stream cannot be opened from the URLpublic void play(double volume)
public void play(double volume, double pan)
public void stop()