libvorbisenc documentation

libvorbisenc release 1.1 - 20040709

vorbis_encode_init_vbr

declared in "vorbis/libvorbisenc.h";

This is the primary function within libvorbisenc for setting up variable bitrate ("quality" based) modes.

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.




extern int vorbis_encode_init_vbr(vorbis_info *vi,
			      long channels,
			      long rate,
			      
			      float base_quality);

Parameters

vi
File pointer to an initialized vorbis_info struct.
channels
The number of channels to be encoded.
rate
The sampling rate of the source audio.
base_quality
Desired quality level, currently from -0.1 to 1.0 (lo to hi).

Return Values

  • 0 for success
  • less than zero for failure:



  • copyright © 2004 xiph.org

    Ogg Vorbis
    team@vorbis.org

    libvorbisenc documentation

    libvorbisenc release 1.1 - 20040709