Interface ClientReceiveSoundEvent

All Superinterfaces:
ClientEvent, Event
All Known Subinterfaces:
ClientReceiveSoundEvent.EntitySound, ClientReceiveSoundEvent.LocationalSound, ClientReceiveSoundEvent.StaticSound

public interface ClientReceiveSoundEvent extends ClientEvent
This event is emitted before the sound is played on the client.
  • 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