libvorbisenc - function - vorbis_encode_setup_init

libvorbisenc documentation | libvorbisenc release 1.1 - 20040709

# vorbis_encode_setup_init

declared in "vorbis/libvorbisenc.h";

This function performs the last stage of three-step encoding setup, as described in the API overview under managed bitrate modes.

Before this function is called, the vorbis_info struct should be initialized by using vorbis_info_init() from the libvorbis API, one of vorbis_encode_setup_managed() or vorbis_encode_setup_vbr() called to initialize the high-level encoding setup, and vorbis_encode_ctl() called if necessary to make encoding setup changes. vorbis_encode_setup_init() finalizes the highlevel encoding structure into a complete encoding setup after which the application may make no further setup changes.

After encoding, vorbis_info_clear should be called.

    extern int vorbis_encode_setup_init(vorbis_info *vi);

### Parameters

vi
  File pointer to an initialized vorbis_info struct.

### Return Values

> - 0 for success
> - less than zero for failure:
> - OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.
> - OV_EINVAL - Attempt to use vorbis_encode_setup_init() without first calling one of vorbis_encode_setup_managed() or vorbis_encode_setup_vbr() to initialize the high-level encoding setup

copyright © 2004 xiph.org | Ogg Vorbis team@vorbis.org
libvorbisenc documentation | libvorbisenc release 1.1 - 20040709