Package discord4j.voice
Class LocalVoiceSendTaskFactory
- java.lang.Object
-
- discord4j.voice.LocalVoiceSendTaskFactory
-
- All Implemented Interfaces:
VoiceSendTaskFactory
public class LocalVoiceSendTaskFactory extends Object implements VoiceSendTaskFactory
A local implementation of aVoiceSendTaskFactory, performing all actions in the same JVM instance.
-
-
Constructor Summary
Constructors Constructor Description LocalVoiceSendTaskFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Disposablecreate(Scheduler scheduler, Consumer<Boolean> speakingSender, Consumer<ByteBuf> voiceSender, AudioProvider provider, discord4j.voice.PacketTransformer transformer)Create a task that is capable of handling outbound audio packets.
-
-
-
Method Detail
-
create
public Disposable create(Scheduler scheduler, Consumer<Boolean> speakingSender, Consumer<ByteBuf> voiceSender, AudioProvider provider, discord4j.voice.PacketTransformer transformer)
Description copied from interface:VoiceSendTaskFactoryCreate a task that is capable of handling outbound audio packets.- Specified by:
createin interfaceVoiceSendTaskFactory- Parameters:
scheduler- a dedicatedSchedulerthat can be used to run the taskspeakingSender- a sink capable to signaling speaking status to DiscordvoiceSender- a sink capable of sending outbound audio to Discordprovider- a strategy to produce audio packets that can be encodedtransformer- a strategy to encode a packet into a raw buffer- Returns:
- a task that can process audio and send it
-
-