Package discord4j.voice
Class LocalVoiceReceiveTaskFactory
- java.lang.Object
-
- discord4j.voice.LocalVoiceReceiveTaskFactory
-
- All Implemented Interfaces:
VoiceReceiveTaskFactory
public class LocalVoiceReceiveTaskFactory extends Object implements VoiceReceiveTaskFactory
A local implementation of aVoiceReceiveTaskFactory, performing all actions in the same JVM instance.
-
-
Constructor Summary
Constructors Constructor Description LocalVoiceReceiveTaskFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Disposablecreate(Scheduler scheduler, Flux<ByteBuf> in, discord4j.voice.PacketTransformer transformer, AudioReceiver receiver)Create a task that is capable of handling incoming audio packets.
-
-
-
Method Detail
-
create
public Disposable create(Scheduler scheduler, Flux<ByteBuf> in, discord4j.voice.PacketTransformer transformer, AudioReceiver receiver)
Description copied from interface:VoiceReceiveTaskFactoryCreate a task that is capable of handling incoming audio packets.- Specified by:
createin interfaceVoiceReceiveTaskFactory- Parameters:
scheduler- a dedicatedSchedulerthat can be used to run the taskin- a sequence of raw incoming audioByteBufpacketstransformer- a strategy to decode a packet from a rawByteBufreceiver- a strategy to consume decoded audio packets- Returns:
- a task that can receive audio and process it
-
-