Package discord4j.voice
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 TypeMethodDescriptioncreate
(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 dedicatedScheduler
that can be used to run the taskin
- a sequence of raw incoming audioByteBuf
packetstransformer
- a strategy to decode a packet from a rawByteBuf
receiver
- a strategy to consume decoded audio packets- Returns:
- a task that can receive audio and process it
-