cannam@86: cannam@86: cannam@86: cannam@86: Vorbisfile - function - ov_read_float cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86:

Vorbisfile documentation

vorbisfile version 1.3.2 - 20101101

cannam@86: cannam@86:

ov_read_float()

cannam@86: cannam@86:

declared in "vorbis/vorbisfile.h";

cannam@86: cannam@86:

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

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

cannam@86: cannam@86:

cannam@86: cannam@86: cannam@86: cannam@86: cannam@86:
cannam@86:

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

Parameters

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

Return Values

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

Notes

cannam@86:

Typical usage: cannam@86:

cannam@86: float **pcm; cannam@86: samples_read = ov_read_float(&vf,pcm, 1024, &current_section) cannam@86:
cannam@86: cannam@86: This decodes up to 1024 float samples. cannam@86:

cannam@86: cannam@86:
cannam@86:

cannam@86:
cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86:

copyright © 2002 vorbis team

Ogg Vorbis

Vorbisfile documentation

vorbisfile version 1.3.2 - 20101101

cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: cannam@86: