Class OpusDecoderExtensions
Contains the OpusDecoder helper extensions.
Inherited Members
Namespace: OpusSharp.Core.Extensions
Assembly: OpusSharp.Core.dll
Syntax
public static class OpusDecoderExtensions
Remarks
OPUS_SET_COMPLEXITY and OPUS_GET_COMPLEXITY have not been added since they aren't documented yet in the opus documentation.
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. |
Exceptions
Type | Condition |
---|---|
OpusException | |
ObjectDisposedException |
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. |
Exceptions
Type | Condition |
---|---|
OpusException | |
ObjectDisposedException |
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. |
Exceptions
Type | Condition |
---|---|
OpusException | |
ObjectDisposedException |
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). |
Exceptions
Type | Condition |
---|---|
OpusException | |
ObjectDisposedException |
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. |
Exceptions
Type | Condition |
---|---|
OpusException | |
ObjectDisposedException |
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. |
Exceptions
Type | Condition |
---|---|
OpusException | |
ObjectDisposedException |
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. |
Exceptions
Type | Condition |
---|---|
OpusException | |
ObjectDisposedException |
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. |
Exceptions
Type | Condition |
---|---|
OpusException | |
ObjectDisposedException |
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. |
Exceptions
Type | Condition |
---|---|
OpusException | |
ObjectDisposedException |
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. |
Exceptions
Type | Condition |
---|---|
OpusException | |
ObjectDisposedException |