libvorbis - function - vorbis_analysis_buffer

libvorbis documentation | libvorbis version 1.3.2 - 20101101

# vorbis_analysis_buffer

declared in "vorbis/codec.h";

This fuction requests a buffer array for delivering audio to the encoder for compression.

The Vorbis encoder expects the caller to write audio data as non-interleaved floating point samples into its internal buffers.

The general procedure is to call this function with the number of samples you have available. The encoder will arrange for that much internal storage and return an array of buffer pointers, one for each channel of audio. The caller must then write the audio samples into those buffers, as float values, and finally call vorbis_analysis_wrote() to tell the encoder the data is available for analysis.

    extern float  **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals);

### Parameters

v
  Pointer to the vorbis_dsp_state representing the encoder.
vals
  Number of samples to provide space for in the returned buffer. 1024 is a reasonable choice.

### Return Values

Returns an array of floating point buffers which can accept data. A (**float) where the first index is the channel, and the second is the sample index.

copyright © 2010 Xiph.Org | Ogg Vorbis
libvorbis documentation | libvorbis version 1.3.2 - 20101101