opus_multistream_encoder_create method

Pointer<OpusMSEncoder> opus_multistream_encoder_create(
  1. int Fs,
  2. int channels,
  3. int streams,
  4. int coupled_streams,
  5. Pointer<Uint8> mapping,
  6. int application,
  7. Pointer<Int32> error,
)

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_APPLICATION_VOIP
Process signal for improved speech intelligibility.
#OPUS_APPLICATION_AUDIO
Favor faithfulness to the original input.
#OPUS_APPLICATION_RESTRICTED_LOWDELAY
Configure the minimum possible coding delay by disabling certain modes of operation.
@param[out] error int *: Returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes) on failure.

Implementation

ffi.Pointer<OpusMSEncoder> opus_multistream_encoder_create(
  int Fs,
  int channels,
  int streams,
  int coupled_streams,
  ffi.Pointer<ffi.Uint8> mapping,
  int application,
  ffi.Pointer<ffi.Int32> error,
) {
  return _opus_multistream_encoder_create(
      Fs, channels, streams, coupled_streams, mapping, application, error);
}