Interface ClientSoundEvent

All Superinterfaces:
ClientEvent, Event

public interface ClientSoundEvent extends ClientEvent
This event is emitted before the client encodes the audio and sends it to the server.
  • Method Summary

    Modifier and Type
    Method
    Description
    short[]
    The unencoded audio data.
    boolean
     
    void
    setRawAudio(short[] rawAudio)
    Overrides the actual audio data that's sent to the server.

    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

    • 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(short[] rawAudio)
      Overrides the actual audio data that's sent to the server.
      Parameters:
      rawAudio - the raw 16 bit PCM audio frame
    • isWhispering

      boolean isWhispering()
      Returns:
      if the player is whispering