FunctionsAndGlobals class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
opus_encode(Pointer<OpusEncoder> st, Pointer<Int16> pcm, int frame_size, Pointer<Uint8> data, int max_data_bytes)
→ int
-
Encodes an Opus frame.
@param
in
st OpusEncoder*: Encoder state
@param in
pcm opus_int16*: Input signal (interleaved if 2 channels). length is frame_sizechannelssizeof(opus_int16)
@param in
frame_size int: Number of samples per channel in the
input signal.
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.
@param out
data unsigned char*: Output payload.
This must contain storage for at
least a max_data_bytes.
@param in
max_data_bytes opus_int32: 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 The length of the encoded packet (in bytes) on success or a
negative error code (see @ref opus_errorcodes) on failure.
-
opus_encode_float(Pointer<OpusEncoder> st, Pointer<Float> pcm, int frame_size, Pointer<Uint8> data, int max_data_bytes)
→ int
-
Encodes an Opus frame from floating point input.
@param
in
st OpusEncoder*: Encoder state
@param in
pcm float*: Input in float format (interleaved if 2 channels), with a normal range of +/-1.0.
Samples with a range beyond +/-1.0 are supported but will
be clipped by decoders using the integer API and should
only be used if it is known that the far end supports
extended dynamic range.
length is frame_sizechannelssizeof(float)
@param in
frame_size int: Number of samples per channel in the
input signal.
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.
@param out
data unsigned char*: Output payload.
This must contain storage for at
least a max_data_bytes.
@param in
max_data_bytes opus_int32: 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 The length of the encoded packet (in bytes) on success or a
negative error code (see @ref opus_errorcodes) on failure.
-
opus_encoder_create(int Fs, int channels, int application, Pointer<Int32> error)
→ Pointer<OpusEncoder>
-
Allocates and initializes an encoder state.
There are three coding modes:
-
opus_encoder_destroy(Pointer<OpusEncoder> st)
→ void
-
Frees an
OpusEncoder
allocated by opus_encoder_create().
@param in
st OpusEncoder*: State to be freed.
-
opus_encoder_get_size(int channels)
→ int
-
Gets the size of an
OpusEncoder
structure.
@param in
channels int: Number of channels.
This must be 1 or 2.
@returns The size in bytes.
-
opus_encoder_init(Pointer<OpusEncoder> st, int Fs, int channels, int application)
→ int
-
Initializes a previously allocated encoder state
The memory pointed to by st must be at least the size returned by opus_encoder_get_size().
This is intended for applications which use their own allocator instead of malloc.
@see opus_encoder_create(),opus_encoder_get_size()
To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
@param
in
st OpusEncoder*: Encoder state
@param in
Fs opus_int32: Sampling rate of input signal (Hz)
This must be one of 8000, 12000, 16000,
24000, or 48000.
@param in
channels int: Number of channels (1 or 2) in input signal
@param in
application int: Coding mode (OPUS_APPLICATION_VOIP/OPUS_APPLICATION_AUDIO/OPUS_APPLICATION_RESTRICTED_LOWDELAY)
@retval #OPUS_OK Success or @ref opus_errorcodes
-
toString()
→ String
-
A string representation of this object.
inherited