Table of Contents
API reference

Method BindExternalOpusSourceAsync

Namespace
DisCatSharp.Voice
Assembly
DisCatSharp.Voice.dll

BindExternalOpusSourceAsync(IExternalOpusSource, CancellationToken)

Binds an external Opus source to this voice connection. Frames from the source bypass the internal Opus encoder but go through RTP framing, DAVE E2EE, and AEAD transport encryption.

public Task BindExternalOpusSourceAsync(IExternalOpusSource source, CancellationToken cancellationToken = default)

Parameters

source IExternalOpusSource

The external Opus source to bind.

cancellationToken CancellationToken

Token to cancel the binding.

Returns

Task

A task that completes when the source stops producing frames or is cancelled.

Exceptions

InvalidOperationException

Thrown when EnableExternalOpus is not enabled.