Discord::VoiceUDP
Inherits Reference / Object
Client for Discord's voice UDP protocol, on which the actual audio data is
sent. There should be no reason to manually use this class: use
VoiceClient instead which uses this class internally.
Constructors
new
SourceInstance methods
connect(endpoint : String, port : UInt32, ssrc : UInt32)
Sourcemode
Sourcemode=(mode : Nil | String)
Sourcereceive_discovery_reply
Awaits a response to the discovery request and returns our local IP and port once the response is received
secret_key
Sourcesecret_key=(secret_key : Slice(UInt8) | Nil)
Sourcesend_audio(buf, sequence, time)
Sends 20 ms of opus audio data to Discord, with the specified sequence and time (used on the receiving client to synchronise packets)
send_discovery
Sends a discovery packet to Discord, telling them that we want to know our IP so we can select the protocol on the VWS
socket
Source