DiscordSilenceVoiceDataSource
public final class DiscordSilenceVoiceDataSource : DiscordVoiceDataSource
A voice source that returns Opus silence. Only sends 5 packets of silence and is then spent.
-
The size of the frame.
Declaration
Swift
public let frameSize = 960 -
The source from a previous engine that is being carried over.
Declaration
Swift
public let previousSource: DiscordVoiceDataSource? -
Creates a new silence data source. If
previousSourceis sent then when the silence data is used it the engine will attempt to usepreviousSourcerather than asking for a new source.Declaration
Swift
public init(previousSource: DiscordVoiceDataSource?) -
Returns silence packets.
Declaration
Swift
public func engineNeedsData(_ engine: DiscordVoiceEngine) throws -> [UInt8]Parameters
engineThe engine requesting data.
Return Value
Opus encoded silence.
-
Unimplemented
Declaration
Swift
public func finishUpAndClose() -
Unimplemented
Declaration
Swift
public func startReading()
DiscordSilenceVoiceDataSource Class Reference