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_multistream_decode(Pointer<OpusMSDecoder> st, Pointer<Uint8> data, int len, Pointer<Int16> pcm, int frame_size, int decode_fec)
→ int
-
Decode a multistream Opus packet.
@param st OpusMSDecoder*: Multistream decoder state.
@param
in
data const unsigned char*: Input payload.
Use a NULL
pointer to indicate packet
loss.
@param len opus_int32: Number of bytes in payload.
@paramout
pcm opus_int16*: Output signal, with interleaved
samples.
This must contain room for
frame_size*channels
samples.
@param frame_size int: The number of samples per channel of
available space in a pcm.
If this is less than the maximum packet duration
(120 ms; 5760 for 48kHz), this function will not be capable
of decoding some packets. In the case of PLC (data==NULL)
or FEC (decode_fec=1), then frame_size needs to be exactly
the duration of audio that is missing, otherwise the
decoder will not be in the optimal state to decode the
next incoming packet. For the PLC and FEC cases, frame_size
must be a multiple of 2.5 ms.
@param decode_fec int: Flag (0 or 1) to request that any in-band
forward error correction data be decoded.
If no such data is available, the frame is
decoded as if it were lost.
@returns Number of samples decoded on success or a negative error code
(see @ref opus_errorcodes) on failure.
-
opus_multistream_decode_float(Pointer<OpusMSDecoder> st, Pointer<Uint8> data, int len, Pointer<Float> pcm, int frame_size, int decode_fec)
→ int
-
Decode a multistream Opus packet with floating point output.
@param st OpusMSDecoder*: Multistream decoder state.
@param
in
data const unsigned char*: Input payload.
Use a NULL
pointer to indicate packet
loss.
@param len opus_int32: Number of bytes in payload.
@paramout
pcm opus_int16*: Output signal, with interleaved
samples.
This must contain room for
frame_size*channels
samples.
@param frame_size int: The number of samples per channel of
available space in a pcm.
If this is less than the maximum packet duration
(120 ms; 5760 for 48kHz), this function will not be capable
of decoding some packets. In the case of PLC (data==NULL)
or FEC (decode_fec=1), then frame_size needs to be exactly
the duration of audio that is missing, otherwise the
decoder will not be in the optimal state to decode the
next incoming packet. For the PLC and FEC cases, frame_size
must be a multiple of 2.5 ms.
@param decode_fec int: Flag (0 or 1) to request that any in-band
forward error correction data be decoded.
If no such data is available, the frame is
decoded as if it were lost.
@returns Number of samples decoded on success or a negative error code
(see @ref opus_errorcodes) on failure.
-
opus_multistream_decoder_create(int Fs, int channels, int streams, int coupled_streams, Pointer<Uint8> mapping, Pointer<Int32> error)
→ Pointer<OpusMSDecoder>
-
Allocates and initializes a multistream decoder state.
Call opus_multistream_decoder_destroy() to release
this object when finished.
@param Fs opus_int32: Sampling rate to decode at (in Hz).
This must be one of 8000, 12000, 16000,
24000, or 48000.
@param channels int: Number of channels to output.
This must be at most 255.
It may be different from the number of coded
channels (
streams +
coupled_streams
).
@param streams int: The total number of streams coded in the
input.
This must be no more than 255.
@param coupled_streams int: Number of streams to decode as coupled
(2 channel) streams.
This must be no larger than the total
number of streams.
Additionally, The total number of
coded channels (streams +
coupled_streams
) must be no
more than 255.
@paramin
mapping const unsigned charchannels
: Mapping from
coded channels to output channels, as described in
@ref opus_multistream.
@paramout
error int *: Returns #OPUS_OK on success, or an error
code (see @ref opus_errorcodes) on
failure.
-
opus_multistream_decoder_destroy(Pointer<OpusMSDecoder> st)
→ void
-
Frees an
OpusMSDecoder
allocated by
opus_multistream_decoder_create().
@param st OpusMSDecoder: Multistream decoder state to be freed.
-
opus_multistream_decoder_get_size(int streams, int coupled_streams)
→ int
-
Gets the size of an
OpusMSDecoder
structure.
@param streams int: The total number of streams coded in the
input.
This must be no more than 255.
@param coupled_streams int: Number streams to decode as coupled
(2 channel) streams.
This must be no larger than the total
number of streams.
Additionally, The total number of
coded channels (streams +
coupled_streams
) must be no
more than 255.
@returns The size in bytes on success, or a negative error code
(see @ref opus_errorcodes) on error.
-
opus_multistream_decoder_init(Pointer<OpusMSDecoder> st, int Fs, int channels, int streams, int coupled_streams, Pointer<Uint8> mapping)
→ int
-
Intialize a previously allocated decoder state object.
The memory pointed to by a st must be at least the size returned by
opus_multistream_encoder_get_size().
This is intended for applications which use their own allocator instead of
malloc.
To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
@see opus_multistream_decoder_create
@see opus_multistream_deocder_get_size
@param st OpusMSEncoder*: Multistream encoder state to initialize.
@param Fs opus_int32: Sampling rate to decode at (in Hz).
This must be one of 8000, 12000, 16000,
24000, or 48000.
@param channels int: Number of channels to output.
This must be at most 255.
It may be different from the number of coded
channels (
streams +
coupled_streams
).
@param streams int: The total number of streams coded in the
input.
This must be no more than 255.
@param coupled_streams int: Number of streams to decode as coupled
(2 channel) streams.
This must be no larger than the total
number of streams.
Additionally, The total number of
coded channels (streams +
coupled_streams
) must be no
more than 255.
@paramin
mapping const unsigned charchannels
: Mapping from
coded channels to output channels, as described in
@ref opus_multistream.
@returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)
on failure.
-
opus_multistream_encode(Pointer<OpusMSEncoder> st, Pointer<Int16> pcm, int frame_size, Pointer<Uint8> data, int max_data_bytes)
→ int
-
Encodes a multistream Opus frame.
@param st OpusMSEncoder*: Multistream encoder state.
@param
in
pcm const opus_int16*: The input signal as interleaved
samples.
This must contain
frame_sizechannels
samples.
@param 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.
@paramout
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_multistream_encode_float(Pointer<OpusMSEncoder> st, Pointer<Float> pcm, int frame_size, Pointer<Uint8> data, int max_data_bytes)
→ int
-
Encodes a multistream Opus frame from floating point input.
@param st OpusMSEncoder*: Multistream encoder state.
@param
in
pcm const float*: The input signal as interleaved
samples 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.
This must contain
frame_sizechannels
samples.
@param 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.
@paramout
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_multistream_encoder_create(int Fs, int channels, int streams, int coupled_streams, Pointer<Uint8> mapping, int application, Pointer<Int32> error)
→ Pointer<OpusMSEncoder>
-
Allocates and initializes a multistream encoder state.
Call opus_multistream_encoder_destroy() to release
this object when finished.
@param Fs opus_int32: Sampling rate of the input signal (in Hz).
This must be one of 8000, 12000, 16000,
24000, or 48000.
@param channels int: Number of channels in the input signal.
This must be at most 255.
It may be greater than the number of
coded channels (
streams +
coupled_streams
).
@param streams int: The total number of streams to encode from the
input.
This must be no more than the number of channels.
@param coupled_streams int: Number of coupled (2 channel) streams
to encode.
This must be no larger than the total
number of streams.
Additionally, The total number of
encoded channels (streams +
coupled_streams
) must be no
more than the number of input channels.
@paramin
mapping const unsigned charchannels
: Mapping from
encoded channels to input channels, as described in
@ref opus_multistream. As an extra constraint, the
multistream encoder does not allow encoding coupled
streams for which one channel is unused since this
is never a good idea.
@param application int: The target encoder application.
This must be one of the following:
-
opus_multistream_encoder_destroy(Pointer<OpusMSEncoder> st)
→ void
-
Frees an
OpusMSEncoder
allocated by
opus_multistream_encoder_create().
@param st OpusMSEncoder*: Multistream encoder state to be freed.
-
opus_multistream_encoder_get_size(int streams, int coupled_streams)
→ int
-
Gets the size of an OpusMSEncoder structure.
@param streams int: The total number of streams to encode from the
input.
This must be no more than 255.
@param coupled_streams int: Number of coupled (2 channel) streams
to encode.
This must be no larger than the total
number of streams.
Additionally, The total number of
encoded channels (
streams +
coupled_streams
) must be no
more than 255.
@returns The size in bytes on success, or a negative error code
(see @ref opus_errorcodes) on error.
-
opus_multistream_encoder_init(Pointer<OpusMSEncoder> st, int Fs, int channels, int streams, int coupled_streams, Pointer<Uint8> mapping, int application)
→ int
-
Initialize a previously allocated multistream encoder state.
The memory pointed to by a st must be at least the size returned by
opus_multistream_encoder_get_size().
This is intended for applications which use their own allocator instead of
malloc.
To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
@see opus_multistream_encoder_create
@see opus_multistream_encoder_get_size
@param st OpusMSEncoder*: Multistream encoder state to initialize.
@param Fs opus_int32: Sampling rate of the input signal (in Hz).
This must be one of 8000, 12000, 16000,
24000, or 48000.
@param channels int: Number of channels in the input signal.
This must be at most 255.
It may be greater than the number of
coded channels (
streams +
coupled_streams
).
@param streams int: The total number of streams to encode from the
input.
This must be no more than the number of channels.
@param coupled_streams int: Number of coupled (2 channel) streams
to encode.
This must be no larger than the total
number of streams.
Additionally, The total number of
encoded channels (streams +
coupled_streams
) must be no
more than the number of input channels.
@paramin
mapping const unsigned charchannels
: Mapping from
encoded channels to input channels, as described in
@ref opus_multistream. As an extra constraint, the
multistream encoder does not allow encoding coupled
streams for which one channel is unused since this
is never a good idea.
@param application int: The target encoder application.
This must be one of the following:
-
opus_multistream_surround_encoder_create(int Fs, int channels, int mapping_family, Pointer<Int32> streams, Pointer<Int32> coupled_streams, Pointer<Uint8> mapping, int application, Pointer<Int32> error)
→ Pointer<OpusMSEncoder>
-
Allocates and initializes a multistream encoder state.
-
opus_multistream_surround_encoder_get_size(int channels, int mapping_family)
→ int
-
Gets the size of an OpusMSEncoder structure.
-
opus_multistream_surround_encoder_init(Pointer<OpusMSEncoder> st, int Fs, int channels, int mapping_family, Pointer<Int32> streams, Pointer<Int32> coupled_streams, Pointer<Uint8> mapping, int application)
→ int
-
Initialize a previously allocated multistream encoder state.
-
toString()
→ String
-
A string representation of this object.
inherited