Interface IAudioSendFactory

All Known Implementing Classes:
DefaultSendFactory

public interface IAudioSendFactory
Factory interface for the creation of new IAudioSendSystem objects.
JDA, by default, uses DefaultSendFactory for the creation of its UDP audio packet sending system.

Implementations of this interface are provided to JDABuilder.setAudioSendFactory(IAudioSendFactory).

  • Method Details

    • createSendSystem

      @Nonnull IAudioSendSystem createSendSystem(@Nonnull IPacketProvider packetProvider)
      Called by JDA's audio system when a new IAudioSendSystem instance is needed to handle the sending of UDP audio packets to discord.
      Parameters:
      packetProvider - The connection provided to the new IAudioSendSystem object for proper setup and usage.
      Returns:
      The newly constructed IAudioSendSystem, ready for IAudioSendSystem.start() to be called.