DiscordVoiceEngineDelegate
public protocol DiscordVoiceEngineDelegate : class
Declares that a type will be a client for a voice engine.
-
Handles received opus voice data from a voice engine.
Declaration
Swift
func voiceEngine(_ engine: DiscordVoiceEngine, didReceiveOpusVoiceData data: DiscordOpusVoiceData)
Parameters
data
The voice data that was received
-
Handles received raw voice data from a voice engine.
Declaration
Swift
func voiceEngine(_ engine: DiscordVoiceEngine, didReceiveRawVoiceData data: DiscordRawVoiceData)
Parameters
data
The voice data that was received
-
Called when the voice engine disconnects.
Declaration
Swift
func voiceEngineDidDisconnect(_ engine: DiscordVoiceEngine)
Parameters
engine
The engine that disconnected.
-
Called when the voice engine needs an encoder.
Declaration
Swift
func voiceEngineNeedsDataSource(_ engine: DiscordVoiceEngine) throws -> DiscordVoiceDataSource?
Parameters
engine
The engine that needs an encoder.
Return Value
An encoder.
-
Called when the voice engine is ready.
Declaration
Swift
func voiceEngineReady(_ engine: DiscordVoiceEngine)
Parameters
engine
The engine that’s ready.