Enum OpusControlRequest
- Namespace
- DSharpPlus.VoiceLink.Opus
- Assembly
- DSharpPlus.VoiceLink.dll
public enum OpusControlRequest
Fields
GetApplication = 4001
Gets the encoder's configured application.
GetBandwidth = 4009
Gets the encoder's configured bandpass or the decoder's last bandpass.
GetBitrate = 4003
Gets the encoder's bitrate configuration.
GetComplexity = 4011
Gets the encoder's complexity configuration.
GetDtx = 4017
Gets encoder's configured use of discontinuous transmission.
GetExpertFrameDuration = 4041
Gets the encoder's configured use of variable duration frames.
GetFinalRange = 4031
Gets the final state of the codec's entropy coder. This is used for testing purposes, The encoder and decoder state should be identical after coding a payload (assuming no data corruption or software bugs)
GetForceChannels = 4023
Gets the encoder's forced channel configuration.
GetGain = 4045
Gets the decoder's configured gain adjustment.
GetInDtx = 4049
Gets the DTX state of the encoder. Returns whether the last encoded frame was either a comfort noise update during DTX or not encoded because of DTX.
GetInbandFec = 4013
Gets encoder's configured use of inband forward error correction.
GetLastPacketDuration = 4039
Gets the duration (in samples) of the last packet successfully decoded or concealed.
GetLookahead = 4027
Gets the total samples of delay added by the entire codec. This can be queried by the encoder and then the provided number of samples can be skipped on from the start of the decoder's output to provide time aligned input and output. From the perspective of a decoding application the real data begins this many samples late. The decoder contribution to this delay is identical for all decoders, but the encoder portion of the delay may vary from implementation to implementation, version to version, or even depend on the encoder's initial configuration. Applications needing delay compensation should call this CTL rather than hard-coding a value.
GetLsbDepth = 4037
Gets the encoder's configured signal depth.
GetMaxBandwidth = 4005
Gets the encoder's configured maximum allowed bandpass.
GetPacketLossPerc = 4015
Gets the encoder's configured packet loss percentage.
GetPhaseInversionDisabled = 4047
Gets the encoder's configured phase inversion status.
GetPitch = 4033
Gets the pitch of the last decoded frame, if available. This can be used for any post-processing algorithm requiring the use of pitch, e.g. time stretching/shortening. If the last frame was not voiced, or if the pitch was not coded in the frame, then zero is returned.
GetPredictionDisabled = 4043
Gets the encoder's configured prediction status.
GetSampleRate = 4029
Gets the sampling rate the encoder or decoder was initialized with. This simply returns the value passed to Init(OpusSampleRate, int, OpusApplication) or Init(OpusSampleRate, int).
GetSignal = 4025
Gets the encoder's configured signal type.
GetVbr = 4007
Determine if variable bitrate (VBR) is enabled in the encoder.
GetVbrConstraint = 4021
Determine if constrained VBR is enabled in the encoder.
SetApplication = 4000
Configures the encoder's intended application. The initial value is a mandatory argument to the encoder_create function.
SetBandwidth = 4008
Sets the encoder's bandpass to a specific value. This prevents the encoder from automatically selecting the bandpass based on the available bitrate. If an application knows the bandpass of the input audio it is providing, it should normally use SetMaxBandwidth instead, which still gives the encoder the freedom to reduce the bandpass when the bitrate becomes too low, for better overall quality.
SetBitrate = 4002
Configures the bitrate in the encoder. Rates from 500 to 512000 bits per second are meaningful, as well as the special values OpusApplication.Auto and OPUS_BITRATE_MAX. The value OPUS_BITRATE_MAX can be used to cause the codec to use as much rate as it can, which is useful for controlling the rate by adjusting the output buffer size.
SetComplexity = 4010
Configures the encoder's computational complexity. The supported range is 0-10 inclusive with 10 representing the highest complexity.
SetDtx = 4016
Configures the encoder's use of discontinuous transmission (DTX).
SetExpertFrameDuration = 4040
Configures the encoder's use of variable duration frames. When variable duration is enabled, the encoder is free to use a shorter frame size than the one requested in the Encode(ReadOnlySpan<short>, int, ref Span<byte>) call. It is then the user's responsibility to verify how much audio was encoded by checking the ToC byte of the encoded packet. The part of the audio that was not encoded needs to be resent to the encoder for the next call. Do not use this option unless you really know what you are doing.
SetForceChannels = 4022
Configures mono/stereo forcing in the encoder. This can force the encoder to produce packets encoded as either mono or stereo, regardless of the format of the input audio. This is useful when the caller knows that the input signal is currently a mono source embedded in a stereo stream.
SetGain = 4034
Configures decoder gain adjustment. Scales the decoded output by a factor specified in Q8 dB units. This has a maximum range of -32768 to 32767 inclusive, and returns BadArg otherwise. The default is zero indicating no adjustment. This setting survives decoder reset.
SetInbandFec = 4012
Configures the encoder's use of inband forward error correction (FEC).
SetLsbDepth = 4036
Configures the depth of signal being encoded. This is a hint which helps the encoder identify silence and near-silence. It represents the number of significant bits of linear intensity below which the signal contains ignorable quantization or other noise. For example, SetLsbDepth with a value of 14 would be an appropriate setting for G.711 u-law input. SetLsbDepth with a value of 16 would be appropriate for 16-bit linear pcm input with EncodeFloat(ReadOnlySpan<float>, int, ref Span<byte>). When using Encode(ReadOnlySpan<short>, int, ref Span<byte>) instead of EncodeFloat(ReadOnlySpan<float>, int, ref Span<byte>), or when libopus is compiled for fixed-point, the encoder uses the minimum of the value set here and the value 16.
SetMaxBandwidth = 4004
Configures the maximum bandpass that the encoder will select automatically. Applications should normally use this instead of SetBandwidth (leaving that set to the default, OpusApplication.Auto). This allows the application to set an upper bound based on the type of input it is providing, but still gives the encoder the freedom to reduce the bandpass when the bitrate becomes too low, for better overall quality.
SetPacketLossPerc = 4014
Configures the encoder's expected packet loss percentage. Higher values trigger progressively more loss resistant behavior in the encoder at the expense of quality at a given bitrate in the absence of packet loss, but greater quality under loss.
SetPhaseInversionDisabled = 4046
If set to true, disables the use of phase inversion for intensity stereo, improving the quality of mono downmixes, but slightly reducing normal stereo quality. Disabling phase inversion in the decoder does not comply with RFC 6716, although it does not cause any interoperability issue and is expected to become part of the Opus standard once RFC 6716 is updated by draft-ietf-codec-opus-update.
SetPredictionDisabled = 4042
If set to true, disables almost all use of prediction, making frames almost completely independent. This reduces quality.
SetSignal = 4024
Configures the type of signal being encoded. This is a hint which helps the encoder's mode selection.
SetVbr = 4006
Enables or disables variable bitrate (VBR) in the encoder. The configured bitrate may not be met exactly because frames must be an integer number of bytes in length.
SetVbrConstraint = 4020
Enables or disables constrained VBR in the encoder. This setting is ignored when the encoder is in CBR mode.