Interface VoiceReceiveTaskFactory

All Known Implementing Classes:
LocalVoiceReceiveTaskFactory

public interface VoiceReceiveTaskFactory
A factory to create a task that receives audio packets from a source and processes them through a given AudioReceiver.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(Scheduler scheduler, Flux<ByteBuf> in, discord4j.voice.PacketTransformer transformer, AudioReceiver receiver)
    Create a task that is capable of handling incoming audio packets.
  • Method Details

    • create

      Disposable create(Scheduler scheduler, Flux<ByteBuf> in, discord4j.voice.PacketTransformer transformer, AudioReceiver receiver)
      Create a task that is capable of handling incoming audio packets.
      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