public interface MusicReference
Modifier and Type | Method and Description |
---|---|
long |
bytesAvailable()
Get the number of bytes remaining for each channel until the end of this
Music.
|
void |
dispose()
Does any cleanup necessary to dispose of resources in use by this
MusicReference.
|
boolean |
done()
Determine if there are no bytes remaining and play has stopped.
|
boolean |
getLoop()
Get the loop setting of this MusicReference.
|
long |
getLoopPosition()
Get the loop-position byte index of this MusicReference.
|
double |
getPan()
Get the pan of this MusicReference.
|
boolean |
getPlaying()
Get the playing setting of this MusicReference.
|
long |
getPosition()
Get the byte index of this MusicReference.
|
double |
getVolume()
Get the volume of this MusicReference.
|
void |
nextTwoBytes(int[] data,
boolean bigEndian)
Get the next two bytes from the music data in the specified endianness.
|
void |
setLoop(boolean loop)
Set whether this MusicReference will loop.
|
void |
setLoopPosition(long loopPosition)
Set the loop-position byte index of this MusicReference.
|
void |
setPan(double pan)
Set the pan of this MusicReference.
|
void |
setPlaying(boolean playing)
Set whether this MusicReference is playing.
|
void |
setPosition(long position)
Set the byte index of this MusicReference.
|
void |
setVolume(double volume)
Set the volume of this MusicReference.
|
void |
skipBytes(long num)
Skip a specified number of bytes of the audio data.
|
boolean getPlaying()
boolean getLoop()
long getPosition()
long getLoopPosition()
double getVolume()
double getPan()
void setPlaying(boolean playing)
playing
- whether this MusicReference is playingvoid setLoop(boolean loop)
loop
- whether this MusicReference will loopvoid setPosition(long position)
position
- the byte index to setvoid setLoopPosition(long loopPosition)
loopPosition
- the loop-position byte index to setvoid setVolume(double volume)
volume
- the desired volume of this MusicReferencevoid setPan(double pan)
pan
- the desired pan of this MusicReferencelong bytesAvailable()
boolean done()
void skipBytes(long num)
num
- number of bytes to skipvoid nextTwoBytes(int[] data, boolean bigEndian)
data
- length-2 array to write in next two bytes from each channelbigEndian
- true if the bytes should be read big-endianvoid dispose()