Class AudioPlayerReceiveHandler

java.lang.Object
de.presti.ree6.audio.AudioPlayerReceiveHandler
All Implemented Interfaces:
net.dv8tion.jda.api.audio.AudioReceiveHandler

public class AudioPlayerReceiveHandler extends Object implements net.dv8tion.jda.api.audio.AudioReceiveHandler
All methods in this class are called by JDA threads when resources are available/ready for processing. The receiver will be provided with the latest 20ms of PCM stereo audio Note you can receive even while setting yourself to deafened
  • Field Summary

    Fields inherited from interface net.dv8tion.jda.api.audio.AudioReceiveHandler

    OUTPUT_FORMAT
  • Constructor Summary

    Constructors
    Constructor
    Description
    AudioPlayerReceiveHandler(net.dv8tion.jda.api.entities.Member member, net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel voiceChannel)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
    Method called when the recording should stop.
    void
    handleCombinedAudio(@NotNull net.dv8tion.jda.api.audio.CombinedAudio combinedAudio)
     
    boolean
    includeUserInCombinedAudio(@NotNull net.dv8tion.jda.api.entities.User user)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.dv8tion.jda.api.audio.AudioReceiveHandler

    canReceiveEncoded, canReceiveUser, handleEncodedAudio, handleUserAudio
  • Constructor Details

    • AudioPlayerReceiveHandler

      public AudioPlayerReceiveHandler(net.dv8tion.jda.api.entities.Member member, net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel voiceChannel)
      Constructor.
      Parameters:
      member - The member who started the recording.
      voiceChannel - The voice channel this handler should handle.
  • Method Details

    • canReceiveCombined

      public boolean canReceiveCombined()
      Specified by:
      canReceiveCombined in interface net.dv8tion.jda.api.audio.AudioReceiveHandler
      See Also:
      • AudioReceiveHandler.canReceiveCombined()
    • includeUserInCombinedAudio

      public boolean includeUserInCombinedAudio(@NotNull @NotNull net.dv8tion.jda.api.entities.User user)
      Specified by:
      includeUserInCombinedAudio in interface net.dv8tion.jda.api.audio.AudioReceiveHandler
      See Also:
      • AudioReceiveHandler.canReceiveUser()
    • handleCombinedAudio

      public void handleCombinedAudio(@NotNull @NotNull net.dv8tion.jda.api.audio.CombinedAudio combinedAudio)
      Specified by:
      handleCombinedAudio in interface net.dv8tion.jda.api.audio.AudioReceiveHandler
      See Also:
      • AudioReceiveHandler.handleCombinedAudio(CombinedAudio)
    • endReceiving

      public void endReceiving()
      Method called when the recording should stop.