| 1 |
'\" t |
| 2 |
.\" Title: afReadFrames |
| 3 |
.\" Author: [see the "AUTHOR" section] |
| 4 |
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> |
| 5 |
.\" Date: 03/06/2013 |
| 6 |
.\" Manual: \ \& |
| 7 |
.\" Source: Audio File Library 0.3.6 |
| 8 |
.\" Language: English |
| 9 |
.\" |
| 10 |
.TH "AFREADFRAMES" "3" "03/06/2013" "Audio File Library 0\&.3\&.6" "\ \&" |
| 11 |
.\" ----------------------------------------------------------------- |
| 12 |
.\" * Define some portability stuff |
| 13 |
.\" ----------------------------------------------------------------- |
| 14 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 |
.\" http://bugs.debian.org/507673 |
| 16 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 17 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 18 |
.ie \n(.g .ds Aq \(aq |
| 19 |
.el .ds Aq ' |
| 20 |
.\" ----------------------------------------------------------------- |
| 21 |
.\" * set default formatting |
| 22 |
.\" ----------------------------------------------------------------- |
| 23 |
.\" disable hyphenation |
| 24 |
.nh |
| 25 |
.\" disable justification (adjust text to left margin only) |
| 26 |
.ad l |
| 27 |
.\" ----------------------------------------------------------------- |
| 28 |
.\" * MAIN CONTENT STARTS HERE * |
| 29 |
.\" ----------------------------------------------------------------- |
| 30 |
.SH "NAME" |
| 31 |
afReadFrames \- read sample frames from a track in an audio file |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.sp |
| 34 |
.nf |
| 35 |
#include <audiofile\&.h> |
| 36 |
.fi |
| 37 |
.sp |
| 38 |
.nf |
| 39 |
AFframecount afReadFrames(AFfilehandle file, int track, void *data, |
| 40 |
int count); |
| 41 |
.fi |
| 42 |
.SH "DESCRIPTION" |
| 43 |
.sp |
| 44 |
afReadFrames attempts to read up to \fIcount\fR frames of audio data from the audio file handle \fIfile\fR into the buffer at \fIdata\fR\&. |
| 45 |
.SH "PARAMETERS" |
| 46 |
.sp |
| 47 |
\fIfile\fR is a valid file handle returned by \fBafOpenFile\fR(3)\&. |
| 48 |
.sp |
| 49 |
\fItrack\fR is always AF_DEFAULT_TRACK for all currently supported file formats\&. |
| 50 |
.sp |
| 51 |
\fIdata\fR is a buffer of storing \fIcount\fR frames of audio sample data\&. |
| 52 |
.sp |
| 53 |
\fIcount\fR is the number of sample frames to be read\&. |
| 54 |
.SH "RETURN VALUE" |
| 55 |
.sp |
| 56 |
afReadFrames returns the number of frames successfully read from \fIfile\fR\&. |
| 57 |
.SH "ERRORS" |
| 58 |
.sp |
| 59 |
afReadFrames can produce these errors: |
| 60 |
.PP |
| 61 |
AF_BAD_FILEHANDLE |
| 62 |
.RS 4 |
| 63 |
the file handle was invalid |
| 64 |
.RE |
| 65 |
.PP |
| 66 |
AF_BAD_TRACKID |
| 67 |
.RS 4 |
| 68 |
the track parameter is not |
| 69 |
AF_DEFAULT_TRACK |
| 70 |
.RE |
| 71 |
.PP |
| 72 |
AF_BAD_READ |
| 73 |
.RS 4 |
| 74 |
reading audio data from the file failed |
| 75 |
.RE |
| 76 |
.PP |
| 77 |
AF_BAD_LSEEK |
| 78 |
.RS 4 |
| 79 |
seeking within the file failed |
| 80 |
.RE |
| 81 |
.SH "SEE ALSO" |
| 82 |
.sp |
| 83 |
\fBafWriteFrames\fR(3) |
| 84 |
.SH "AUTHOR" |
| 85 |
.sp |
| 86 |
Michael Pruett <michael@68k\&.org> |