Class OpusDecoderExtensions
Inherited Members
Namespace: OpusSharp.Core.Extensions
Assembly: OpusSharp.Core.dll
Syntax
public static class OpusDecoderExtensions
Methods
| Edit this page View SourceGetBandwidth(OpusDecoder)
Gets the decoder's last bandpass.
Declaration
public static OpusPredefinedValues GetBandwidth(this OpusDecoder decoder)
Parameters
Type | Name | Description |
---|---|---|
OpusDecoder | decoder | The decoder state. |
Returns
Type | Description |
---|---|
OpusPredefinedValues | The decoder's last bandpass. |
GetFinalRange(OpusDecoder)
Gets the final state of the codec's entropy coder.
Declaration
public static uint GetFinalRange(this OpusDecoder decoder)
Parameters
Type | Name | Description |
---|---|---|
OpusDecoder | decoder | The decoder state. |
Returns
Type | Description |
---|---|
uint | The final state of the codec's entropy coder. |
GetGain(OpusDecoder)
Gets the gain for an opus decoder.
Declaration
public static int GetGain(this OpusDecoder decoder)
Parameters
Type | Name | Description |
---|---|---|
OpusDecoder | decoder | The decoder state. |
Returns
Type | Description |
---|---|
int | The gain for the opus decoder. |
GetLastPacketDuration(OpusDecoder)
Gets the duration (in samples) of the last packet successfully decoded or concealed.
Declaration
public static int GetLastPacketDuration(this OpusDecoder decoder)
Parameters
Type | Name | Description |
---|---|---|
OpusDecoder | decoder | The decoder state. |
Returns
Type | Description |
---|---|
int | The last packet duration (in samples). |
GetPhaseInversionDisabled(OpusDecoder)
Gets the decoder's configured phase inversion status.
Declaration
public static bool GetPhaseInversionDisabled(this OpusDecoder decoder)
Parameters
Type | Name | Description |
---|---|---|
OpusDecoder | decoder | The decoder state. |
Returns
Type | Description |
---|---|
bool | Whether the phase inversion is disabled or not. |
GetPitch(OpusDecoder)
Gets the pitch of the last decoded frame, if available.
Declaration
public static int GetPitch(this OpusDecoder decoder)
Parameters
Type | Name | Description |
---|---|---|
OpusDecoder | decoder | The decoder state. |
Returns
Type | Description |
---|---|
int | The pitch of the last decoded frame if available. |
GetSampleRate(OpusDecoder)
Gets the sampling rate the decoder was initialized with.
Declaration
public static int GetSampleRate(this OpusDecoder decoder)
Parameters
Type | Name | Description |
---|---|---|
OpusDecoder | decoder | The decoder state. |
Returns
Type | Description |
---|---|
int | The decoder's configured sample rate. |
Reset(OpusDecoder)
Resets the codec state to be equivalent to a freshly initialized state.
Declaration
public static void Reset(this OpusDecoder decoder)
Parameters
Type | Name | Description |
---|---|---|
OpusDecoder | decoder | The decoder state. |
SetGain(OpusDecoder, short)
Sets gain for an opus decoder.
Declaration
public static void SetGain(this OpusDecoder decoder, short gain)
Parameters
Type | Name | Description |
---|---|---|
OpusDecoder | decoder | The decoder state. |
short | gain | The gain to set. |
SetPhaseInversionDisabled(OpusDecoder, bool)
If set to true, disables the use of phase inversion for intensity stereo, improving the quality of mono down-mixes, but slightly reducing normal stereo quality.
Declaration
public static void SetPhaseInversionDisabled(this OpusDecoder decoder, bool disabled)
Parameters
Type | Name | Description |
---|---|---|
OpusDecoder | decoder | The decoder state. |
bool | disabled | Whether to disable or not. |