Interface ClientReceiveSoundEvent
- All Superinterfaces:
ClientEvent
,Event
- All Known Subinterfaces:
ClientReceiveSoundEvent.EntitySound
,ClientReceiveSoundEvent.LocationalSound
,ClientReceiveSoundEvent.StaticSound
This event is emitted before the sound is played on the client.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
short[]
The unencoded audio data.void
setRawAudio
(short[] rawAudio) Overrides the actual audio data that is played.Methods inherited from interface de.maxhenkel.voicechat.api.events.ClientEvent
getVoicechat
Methods inherited from interface de.maxhenkel.voicechat.api.events.Event
cancel, isCancellable, isCancelled
-
Method Details
-
getId
UUID getId()- Returns:
- the ID of the sender
-
getRawAudio
short[] getRawAudio()The unencoded audio data.
Returns an empty array in case of the end of transmission- Returns:
- the raw 16 bit PCM audio frame
-
setRawAudio
void setRawAudio(@Nullable short[] rawAudio) Overrides the actual audio data that is played.This is ignored, if the
getRawAudio()
array is empty- Parameters:
rawAudio
- the raw 16 bit PCM audio frame
-