Chris@1: Chris@1: Chris@1: Chris@1: libvorbisenc - function - vorbis_encode_init Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:

libvorbisenc documentation

libvorbisenc version 1.3.2 - 20101101

Chris@1: Chris@1:

vorbis_encode_init

Chris@1: Chris@1:

declared in "vorbis/vorbisenc.h";

Chris@1: Chris@1:

This is the primary function within libvorbisenc for setting up managed bitrate modes. Chris@1:

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. Chris@1:

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. Chris@1:

Chris@1:

Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:
Chris@1:

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

Parameters

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

Return Values

Chris@1:
Chris@1:
  • Chris@1: 0 for success
  • Chris@1: Chris@1:
  • less than zero for failure:
  • Chris@1: Chris@1:
    Chris@1:

    Chris@1: Chris@1:

    Chris@1:


    Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:

    copyright © 2000-2010 Xiph.Org

    Ogg Vorbis

    libvorbisenc documentation

    libvorbisenc version 1.3.2 - 20101101

    Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: