| 1 |
afReadFrames(3) |
| 2 |
=============== |
| 3 |
|
| 4 |
NAME |
| 5 |
---- |
| 6 |
afReadFrames - read sample frames from a track in an audio file |
| 7 |
|
| 8 |
SYNOPSIS |
| 9 |
-------- |
| 10 |
#include <audiofile.h> |
| 11 |
|
| 12 |
AFframecount afReadFrames(AFfilehandle file, int track, void *data, |
| 13 |
int count); |
| 14 |
|
| 15 |
DESCRIPTION |
| 16 |
----------- |
| 17 |
`afReadFrames` attempts to read up to 'count' frames of audio data from |
| 18 |
the audio file handle 'file' into the buffer at 'data'. |
| 19 |
|
| 20 |
PARAMETERS |
| 21 |
---------- |
| 22 |
'file' is a valid file handle returned by linkaf:afOpenFile[3]. |
| 23 |
|
| 24 |
'track' is always `AF_DEFAULT_TRACK` for all currently supported file formats. |
| 25 |
|
| 26 |
'data' is a buffer of storing 'count' frames of audio sample data. |
| 27 |
|
| 28 |
'count' is the number of sample frames to be read. |
| 29 |
|
| 30 |
RETURN VALUE |
| 31 |
------------ |
| 32 |
`afReadFrames` returns the number of frames successfully read from 'file'. |
| 33 |
|
| 34 |
ERRORS |
| 35 |
------ |
| 36 |
`afReadFrames` can produce these errors: |
| 37 |
|
| 38 |
`AF_BAD_FILEHANDLE`:: the file handle was invalid |
| 39 |
`AF_BAD_TRACKID`:: the track parameter is not `AF_DEFAULT_TRACK` |
| 40 |
`AF_BAD_READ`:: reading audio data from the file failed |
| 41 |
`AF_BAD_LSEEK`:: seeking within the file failed |
| 42 |
|
| 43 |
SEE ALSO |
| 44 |
-------- |
| 45 |
linkaf:afWriteFrames[3] |
| 46 |
|
| 47 |
AUTHOR |
| 48 |
------ |
| 49 |
Michael Pruett <[email protected]> |