Chris@1: Chris@1: Chris@1: Chris@1: Vorbisfile - function - ov_read_float Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1: Chris@1:

Vorbisfile documentation

vorbisfile version 1.3.2 - 20101101

Chris@1: Chris@1:

ov_read_float()

Chris@1: Chris@1:

declared in "vorbis/vorbisfile.h";

Chris@1: Chris@1:

Chris@1: This is the function used to decode a Vorbis file within a loop, but Chris@1: returns samples in native float format instead of in integer formats. Chris@1:

Chris@1: For information on channel ordering and how ov_read_float() deals with the complex issues Chris@1: of chaining, etc, refer to the documentation for ov_read(). Chris@1:

Chris@1: Chris@1:

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

Chris@1: long ov_read_float(OggVorbis_File *vf, float ***pcm_channels, int samples, int *bitstream);
Chris@1: 
Chris@1:
Chris@1: Chris@1:

Parameters

Chris@1:
Chris@1:
vf
Chris@1:
A pointer to the OggVorbis_File structure--this is used for ALL the externally visible vorbisfile Chris@1: functions.
Chris@1:
pcm_channels
Chris@1:
A pointer to an output buffer. The pointer will be set to the decoded output buffer.
Chris@1:
samples
Chris@1:
Maximum number of decoded samples to produce.
Chris@1:
bitstream
Chris@1:
A pointer to the number of the current logical bitstream.
Chris@1:
Chris@1: Chris@1: Chris@1:

Return Values

Chris@1:
Chris@1:
Chris@1:
OV_HOLE
Chris@1:
indicates there was an interruption in the data. Chris@1:
(one of: garbage between pages, loss of sync followed by Chris@1: recapture, or a corrupt page)
Chris@1:
OV_EBADLINK
Chris@1:
indicates that an invalid stream section was supplied to Chris@1: libvorbisfile, or the requested link is corrupt.
Chris@1:
OV_EINVAL
Chris@1:
indicates the initial file headers couldn't be read or Chris@1: are corrupt, or that the initial open call for vf Chris@1: failed.
Chris@1:
0
Chris@1:
indicates EOF
Chris@1:
n
Chris@1:
indicates actual number of samples read. ov_read_float() will Chris@1: decode at most one vorbis packet per invocation, so the value Chris@1: returned will generally be less than length. Chris@1:
Chris@1:
Chris@1: Chris@1:

Notes

Chris@1:

Typical usage: Chris@1:

Chris@1: float **pcm; Chris@1: samples_read = ov_read_float(&vf,pcm, 1024, &current_section) Chris@1:
Chris@1: Chris@1: This decodes up to 1024 float samples. 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 © 2002 vorbis team

Ogg Vorbis

Vorbisfile documentation

vorbisfile version 1.3.2 - 20101101

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