Loading...
Searching...
No Matches
OpusFileCallbacks Struct Reference

The callbacks used to access non-`FILE` stream resources. More...

`#include <opusfile.h>`

## Data Fields

op_read_func | read
| Used to read data from the stream.
op_seek_func | seek
| Used to seek in the stream.
op_tell_func | tell
| Used to return the current read position in the stream.
op_close_func | close
| Used to close the stream when the decoder is freed.

## Detailed Description

The callbacks used to access non-`FILE` stream resources.

The function prototypes are basically the same as for the stdio functions `fread()`, `fseek()`, `ftell()`, and `fclose()`. The differences are that the `FILE *` arguments have been replaced with a `void *`, which is to be used as a pointer to whatever internal data these functions might need, that seek and tell take and return 64-bit offsets, and that seek must return -1 if the stream is unseekable.

## Field Documentation

## read

op_read_func OpusFileCallbacks::read

Used to read data from the stream.

This must not be `NULL`.

## seek

op_seek_func OpusFileCallbacks::seek

Used to seek in the stream.

This may be `NULL` if seeking is not implemented.

## tell

op_tell_func OpusFileCallbacks::tell

Used to return the current read position in the stream.

This may be `NULL` if seeking is not implemented.

## close

op_close_func OpusFileCallbacks::close

Used to close the stream when the decoder is freed.

This may be `NULL` to leave the stream open.

The documentation for this struct was generated from the following file:

- opusfile.h