Class LocalVoiceReceiveTaskFactory

java.lang.Object
discord4j.voice.LocalVoiceReceiveTaskFactory
All Implemented Interfaces:
VoiceReceiveTaskFactory

public class LocalVoiceReceiveTaskFactory extends Object implements VoiceReceiveTaskFactory
A local implementation of a VoiceReceiveTaskFactory, performing all actions in the same JVM instance.
  • Constructor Details

    • LocalVoiceReceiveTaskFactory

      public LocalVoiceReceiveTaskFactory()
  • Method Details

    • create

      public Disposable create(Scheduler scheduler, Flux<ByteBuf> in, discord4j.voice.PacketTransformer transformer, AudioReceiver receiver)
      Description copied from interface: VoiceReceiveTaskFactory
      Create a task that is capable of handling incoming audio packets.
      Specified by:
      create in interface VoiceReceiveTaskFactory
      Parameters:
      scheduler - a dedicated Scheduler that can be used to run the task
      in - a sequence of raw incoming audio ByteBuf packets
      transformer - a strategy to decode a packet from a raw ByteBuf
      receiver - a strategy to consume decoded audio packets
      Returns:
      a task that can receive audio and process it