[][src]Function fdk_aac_sys::aacEncOpen

pub unsafe extern "C" fn aacEncOpen(
    phAacEncoder: *mut HANDLE_AACENCODER,
    encModules: UINT,
    maxChannels: UINT
) -> AACENC_ERROR

\brief Open an instance of the encoder.

Allocate memory for an encoder instance with a functional range denoted by the function parameters. Preinitialize encoder instance with default configuration.

\param phAacEncoder A pointer to an encoder handle. Initialized on return. \param encModules Specify encoder modules to be supported in this encoder instance: - 0x0: Allocate memory for all available encoder modules. - else: Select memory allocation regarding encoder modules. Following flags are possible and can be combined. - 0x01: AAC module. - 0x02: SBR module. - 0x04: PS module. - 0x08: MPS module. - 0x10: Metadata module. - example: (0x01|0x02|0x04|0x08|0x10) allocates all modules and is equivalent to default configuration denotet by 0x0. \param maxChannels Number of channels to be allocated. This parameter can be used in different ways: - 0: Allocate maximum number of AAC and SBR channels as supported by the library. - nChannels: Use same maximum number of channels for allocating memory in AAC and SBR module. - nChannels | (nSbrCh<<8): Number of SBR channels can be different to AAC channels to save data memory.

\return - AACENC_OK, on succes. - AACENC_INVALID_HANDLE, AACENC_MEMORY_ERROR, AACENC_INVALID_CONFIG, on failure.