libvorbisenc documentation

libvorbisenc release 1.1 - 20040709


declared in "vorbis/vorbisenc.h";

This function performs step-one of a three-step bitrate-managed encode setup. It functions similarly to the one-step setup performed by vorbis_encode_init() but allows an application to make further encode setup tweaks using vorbis_encode_ctl() before finally calling vorbis_encode_setup_init() to complete the setup process.

Before this function is called, the vorbis_info struct should be initialized by using vorbis_info_init() from the libvorbis API. After encoding, vorbis_info_clear should be called.

The max_bitrate, nominal_bitrate, and min_bitrate settings are used to set constraints for the encoded file. This function uses these settings to select the appropriate encoding mode and set it up.

extern int vorbis_encode_init(vorbis_info *vi,
			      long channels,
			      long rate,
			      long max_bitrate,
			      long nominal_bitrate,
			      long min_bitrate);


Pointer to an initialized vorbis_info struct.
The number of channels to be encoded.
The sampling rate of the source audio.
Desired maximum bitrate (limit). -1 indicates unset.
Desired average, or central, bitrate. -1 indicates unset.
Desired minimum bitrate. -1 indicates unset.

Return Values

  • 0 for success
  • less than zero for failure:

  • copyright © 2004

    Ogg Vorbis

    libvorbisenc documentation

    libvorbisenc release 1.1 - 20040709