public static class WorldManagerClient.SoundMessage extends SubjectMessage implements ClientMessage, HasTarget
SoundData
object.
Stop sounds are identified by their (file) name.Modifier and Type | Field and Description |
---|---|
static byte |
soundTypeAmbient |
static byte |
soundTypePoint |
oid
flags, msgId, msgInstanceOid, msgType, remoteAgent
Constructor and Description |
---|
SoundMessage() |
SoundMessage(OID oid) |
Modifier and Type | Method and Description |
---|---|
void |
addSound(SoundData data)
Add a sound to start.
|
void |
addSound(java.lang.String fileName,
boolean looping)
Add a sound.
|
void |
addSound(java.lang.String fileName,
boolean looping,
float gain)
Add a sound.
|
boolean |
getClearFlag()
Get the clear flag.
|
java.util.List<SoundData> |
getSoundData()
Get the sounds to start.
|
OID |
getTarget() |
byte |
getType()
Get the sound message type.
|
void |
removeSound(java.lang.String fileName)
Stop a sound.
|
void |
setClearFlag(boolean val)
Set the clear flag.
|
void |
setSoundData(java.util.List<SoundData> soundData)
Set the sounds to start.
|
void |
setTarget(OID target) |
void |
setType(byte type)
Set the sound message type.
|
AOByteBuffer |
toBuffer() |
java.lang.String |
toString() |
getSubject, setSubject
getEnqueueTime, getMsgId, getMsgInstanceOid, getMsgType, getSenderName, isRPC, setEnqueueTime, setEnqueueTime, setMsgInstanceOid, setMsgType, toBytes, toBytes, toBytes, ToString
public static final byte soundTypePoint
public static final byte soundTypeAmbient
public SoundMessage()
public SoundMessage(OID oid)
public void setSoundData(java.util.List<SoundData> soundData)
public java.util.List<SoundData> getSoundData()
public void addSound(SoundData data)
public void setType(byte type)
public byte getType()
public void setClearFlag(boolean val)
public boolean getClearFlag()
public void addSound(java.lang.String fileName, boolean looping)
fileName
- the sound namelooping
- start a looping sound. Sets the "Loop"
property to "true" or "false".public void addSound(java.lang.String fileName, boolean looping, float gain)
fileName
- the sound namelooping
- start a looping sound. Sets the "Loop"
property to "true" or "false".gain
- the initial sound gain (volume). Ranges from 0.0
to 1.0.public void removeSound(java.lang.String fileName)
public java.lang.String toString()
toString
in class SubjectMessage
public AOByteBuffer toBuffer()
toBuffer
in interface ClientMessage