Vorbisfile - function - ov_read_float

vorbisfile documentation | libVorbisfile version 1.65 - 20020702

# ov_read_float()

declared in "vorbis/vorbisfile.h";

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

For more information on how ov_read_float() deals with the complex issues of chaining, etc, refer to the documentation for ov_read().

    long ov_read(OggVorbis_File *vf, float ***pcm_channels, int *bitstream);

### Parameters

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

### Return Values

> OV_HOLE
>   indicates there was an interruption in the data.
>   (one of: garbage between pages, loss of sync followed by recapture, or a corrupt page)
> OV_EBADLINK
>   indicates that an invalid stream section was supplied to libvorbisfile, or the requested link is corrupt.
> 0
>   indicates EOF
> n
>   indicates actual number of bytes read. `ov_read()` will decode at most one vorbis packet per invocation, so the value returned will generally be less than `length`.

### Notes

Typical usage:

> `float **pcm; bytes_read = ov_read_float(&vf,pcm,&current_section)`

This decodes one packet's worth of float samples.

copyright © 2002 vorbis team | Ogg Vorbis team@vorbis.org
vorbisfile documentation | libVorbisfile version 1.65 - 20020702