OpusSharp OpusSharp
OpusSharp OpusSharp
DocFX + Singulink = ♥

Search Results for

    Edit this page

    Interface IOpusEncoder

    An opus encoder interface.

    Inherited Members
    IDisposable.Dispose()
    Namespace: OpusSharp.Core.Interfaces
    Assembly: OpusSharp.Core.dll
    Syntax
    public interface IOpusEncoder : IDisposable

    Methods

    | Edit this page View Source

    Ctl(EncoderCTL)

    Performs a ctl request.

    Declaration
    int Ctl(EncoderCTL request)
    Parameters
    Type Name Description
    EncoderCTL request

    The request you want to specify.

    Returns
    Type Description
    int

    The result code of the request. See OpusErrorCodes.

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException
    | Edit this page View Source

    Ctl(EncoderCTL, int)

    Performs a ctl request.

    Declaration
    int Ctl(EncoderCTL request, int value)
    Parameters
    Type Name Description
    EncoderCTL request

    The request you want to specify.

    int value

    The input value.

    Returns
    Type Description
    int

    The result code of the request. See OpusErrorCodes.

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException
    | Edit this page View Source

    Ctl(GenericCTL)

    Performs a ctl request.

    Declaration
    int Ctl(GenericCTL request)
    Parameters
    Type Name Description
    GenericCTL request

    The request you want to specify.

    Returns
    Type Description
    int

    The result code of the request. See OpusErrorCodes.

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException
    | Edit this page View Source

    Ctl(GenericCTL, int)

    Performs a ctl set request.

    Declaration
    int Ctl(GenericCTL request, int value)
    Parameters
    Type Name Description
    GenericCTL request

    The request you want to specify.

    int value

    The input value.

    Returns
    Type Description
    int

    The result code of the request. See OpusErrorCodes.

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException
    | Edit this page View Source

    Ctl<T>(EncoderCTL, int, ref T)

    Performs a ctl request.

    Declaration
    int Ctl<T>(EncoderCTL request, int value, ref T value2) where T : unmanaged
    Parameters
    Type Name Description
    EncoderCTL request

    The request you want to specify.

    int value

    The input value.

    T value2

    The second input/output value.

    Returns
    Type Description
    int

    The result code of the request. See OpusErrorCodes.

    Type Parameters
    Name Description
    T

    The type you want to input/output.

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException
    | Edit this page View Source

    Ctl<T>(EncoderCTL, ref T)

    Performs a ctl request.

    Declaration
    int Ctl<T>(EncoderCTL request, ref T value) where T : unmanaged
    Parameters
    Type Name Description
    EncoderCTL request

    The request you want to specify.

    T value

    The input/output value.

    Returns
    Type Description
    int

    The result code of the request. See OpusErrorCodes.

    Type Parameters
    Name Description
    T

    The type you want to input/output.

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException
    | Edit this page View Source

    Ctl<T>(EncoderCTL, ref T, int)

    Performs a ctl request.

    Declaration
    int Ctl<T>(EncoderCTL request, ref T value, int value2) where T : unmanaged
    Parameters
    Type Name Description
    EncoderCTL request

    The request you want to specify.

    T value

    The input/output value.

    int value2

    The second input value.

    Returns
    Type Description
    int

    The result code of the request. See OpusErrorCodes.

    Type Parameters
    Name Description
    T

    The type you want to input/output.

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException
    | Edit this page View Source

    Ctl<T>(GenericCTL, ref T)

    Performs a ctl request.

    Declaration
    int Ctl<T>(GenericCTL request, ref T value) where T : unmanaged
    Parameters
    Type Name Description
    GenericCTL request

    The request you want to specify.

    T value

    The input/output value.

    Returns
    Type Description
    int

    The result code of the request. See OpusErrorCodes.

    Type Parameters
    Name Description
    T

    The type you want to input/output.

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException
    | Edit this page View Source

    Ctl<T, T2>(EncoderCTL, ref T, ref T2)

    Performs a ctl request.

    Declaration
    int Ctl<T, T2>(EncoderCTL request, ref T value, ref T2 value2) where T : unmanaged where T2 : unmanaged
    Parameters
    Type Name Description
    EncoderCTL request

    The request you want to specify.

    T value

    The input/output value.

    T2 value2

    The second input/output value.

    Returns
    Type Description
    int

    The result code of the request. See OpusErrorCodes.

    Type Parameters
    Name Description
    T

    The type you want to input/output.

    T2

    The second type you want to input/output.

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException
    | Edit this page View Source

    Encode(byte[], int, byte[], int)

    Encodes a pcm frame.

    Declaration
    int Encode(byte[] input, int frame_size, byte[] output, int max_data_bytes)
    Parameters
    Type Name Description
    byte[] input

    Input signal (interleaved if 2 channels). length is frame_size*channels.

    int frame_size

    The frame size of the pcm data. This must be an Opus frame size for the encoder's sampling rate. For example, at 48 kHz the permitted values are 120, 240, 480, 960, 1920, and 2880. Passing in a duration of less than 10 ms (480 samples at 48 kHz) will prevent the encoder from using the LPC or hybrid modes.

    byte[] output

    Output payload. This must contain storage for at least max_data_bytes.

    int max_data_bytes

    Size of the allocated memory for the output payload. This may be used to impose an upper limit on the instant bitrate, but should not be used as the only bitrate control. Use OPUS_SET_BITRATE to control the bitrate.

    Returns
    Type Description
    int

    The length of the encoded packet (in bytes).

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException
    | Edit this page View Source

    Encode(short[], int, byte[], int)

    Encodes a pcm frame.

    Declaration
    int Encode(short[] input, int frame_size, byte[] output, int max_data_bytes)
    Parameters
    Type Name Description
    short[] input

    Input signal (interleaved if 2 channels). length is frame_sizechannelssizeof(short).

    int frame_size

    The frame size of the pcm data. This must be an Opus frame size for the encoder's sampling rate. For example, at 48 kHz the permitted values are 120, 240, 480, 960, 1920, and 2880. Passing in a duration of less than 10 ms (480 samples at 48 kHz) will prevent the encoder from using the LPC or hybrid modes.

    byte[] output

    Output payload. This must contain storage for at least max_data_bytes.

    int max_data_bytes

    Size of the allocated memory for the output payload. This may be used to impose an upper limit on the instant bitrate, but should not be used as the only bitrate control. Use OPUS_SET_BITRATE to control the bitrate.

    Returns
    Type Description
    int

    The length of the encoded packet (in bytes).

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException
    | Edit this page View Source

    Encode(int[], int, byte[], int)

    Encodes a pcm frame.

    Declaration
    int Encode(int[] input, int frame_size, byte[] output, int max_data_bytes)
    Parameters
    Type Name Description
    int[] input

    Input signal (interleaved if 2 channels). length is frame_sizechannelssizeof(int).

    int frame_size

    The frame size of the pcm data. This must be an Opus frame size for the encoder's sampling rate. For example, at 48 kHz the permitted values are 120, 240, 480, 960, 1920, and 2880. Passing in a duration of less than 10 ms (480 samples at 48 kHz) will prevent the encoder from using the LPC or hybrid modes.

    byte[] output

    Output payload. This must contain storage for at least max_data_bytes.

    int max_data_bytes

    Size of the allocated memory for the output payload. This may be used to impose an upper limit on the instant bitrate, but should not be used as the only bitrate control. Use OPUS_SET_BITRATE to control the bitrate.

    Returns
    Type Description
    int

    The length of the encoded packet (in bytes).

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException
    | Edit this page View Source

    Encode(float[], int, byte[], int)

    Encodes a floating point pcm frame.

    Declaration
    int Encode(float[] input, int frame_size, byte[] output, int max_data_bytes)
    Parameters
    Type Name Description
    float[] input

    Input signal (interleaved if 2 channels). length is frame_sizechannelssizeof(float).

    int frame_size

    The frame size of the pcm data. This must be an Opus frame size for the encoder's sampling rate. For example, at 48 kHz the permitted values are 120, 240, 480, 960, 1920, and 2880. Passing in a duration of less than 10 ms (480 samples at 48 kHz) will prevent the encoder from using the LPC or hybrid modes.

    byte[] output

    Output payload. This must contain storage for at least max_data_bytes.

    int max_data_bytes

    Size of the allocated memory for the output payload. This may be used to impose an upper limit on the instant bitrate, but should not be used as the only bitrate control. Use OPUS_SET_BITRATE to control the bitrate.

    Returns
    Type Description
    int

    The length of the encoded packet (in bytes).

    Exceptions
    Type Condition
    OpusException
    ObjectDisposedException

    Extension Methods

    OpusEncoderExtensions.GetApplication(IOpusEncoder)
    OpusEncoderExtensions.GetBandwidth(IOpusEncoder)
    OpusEncoderExtensions.GetBitRate(IOpusEncoder)
    OpusEncoderExtensions.GetComplexity(IOpusEncoder)
    OpusEncoderExtensions.GetDtx(IOpusEncoder)
    OpusEncoderExtensions.GetExpertFrameDuration(IOpusEncoder)
    OpusEncoderExtensions.GetFinalRange(IOpusEncoder)
    OpusEncoderExtensions.GetForceChannels(IOpusEncoder)
    OpusEncoderExtensions.GetInDtx(IOpusEncoder)
    OpusEncoderExtensions.GetInbandFec(IOpusEncoder)
    OpusEncoderExtensions.GetLookahead(IOpusEncoder)
    OpusEncoderExtensions.GetLsbDepth(IOpusEncoder)
    OpusEncoderExtensions.GetMaxBandwidth(IOpusEncoder)
    OpusEncoderExtensions.GetPacketLostPercent(IOpusEncoder)
    OpusEncoderExtensions.GetPhaseInversionDisabled(IOpusEncoder)
    OpusEncoderExtensions.GetPredictionDisabled(IOpusEncoder)
    OpusEncoderExtensions.GetQext(IOpusEncoder)
    OpusEncoderExtensions.GetSampleRate(IOpusEncoder)
    OpusEncoderExtensions.GetSignal(IOpusEncoder)
    OpusEncoderExtensions.GetVbr(IOpusEncoder)
    OpusEncoderExtensions.GetVbrConstraint(IOpusEncoder)
    OpusEncoderExtensions.Reset(IOpusEncoder)
    OpusEncoderExtensions.SetApplication(IOpusEncoder, OpusPredefinedValues)
    OpusEncoderExtensions.SetBandwidth(IOpusEncoder, OpusPredefinedValues)
    OpusEncoderExtensions.SetBitRate(IOpusEncoder, int)
    OpusEncoderExtensions.SetComplexity(IOpusEncoder, int)
    OpusEncoderExtensions.SetDtx(IOpusEncoder, bool)
    OpusEncoderExtensions.SetExpertFrameDuration(IOpusEncoder, OpusPredefinedValues)
    OpusEncoderExtensions.SetForceChannels(IOpusEncoder, int)
    OpusEncoderExtensions.SetInbandFec(IOpusEncoder, int)
    OpusEncoderExtensions.SetLsbDepth(IOpusEncoder, int)
    OpusEncoderExtensions.SetMaxBandwidth(IOpusEncoder, int)
    OpusEncoderExtensions.SetPacketLostPercent(IOpusEncoder, int)
    OpusEncoderExtensions.SetPhaseInversionDisabled(IOpusEncoder, bool)
    OpusEncoderExtensions.SetPredictionDisabled(IOpusEncoder, bool)
    OpusEncoderExtensions.SetQext(IOpusEncoder, bool)
    OpusEncoderExtensions.SetSignal(IOpusEncoder, OpusPredefinedValues)
    OpusEncoderExtensions.SetVbr(IOpusEncoder, bool)
    OpusEncoderExtensions.SetVbrConstraint(IOpusEncoder, bool)