'\" t
.\" Title: afWriteFrames
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.76.1
.\" Date: 03/06/2013
.\" Manual: \ \&
.\" Source: Audio File Library 0.3.6
.\" Language: English
.\"
.TH "AFWRITEFRAMES" "3" "03/06/2013" "Audio File Library 0\&.3\&.6" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
afWriteFrames \- write sample frames to a track in an audio file
.SH "SYNOPSIS"
.sp
.nf
#include
.fi
.sp
.nf
AFframecount afWriteFrames(AFfilehandle file, int track, const void *data,
AFframecount count);
.fi
.SH "DESCRIPTION"
.sp
afWriteFrames attempts to write up to \fIcount\fR frames of audio data from the buffer \fIdata\fR to the audio file handle \fIfile\fR\&.
.SH "PARAMETERS"
.sp
\fIfile\fR is a valid file handle returned by \fBafOpenFile\fR(3)\&.
.sp
\fItrack\fR is always AF_DEFAULT_TRACK for all currently supported file formats\&.
.sp
\fIdata\fR is a buffer of sample frames to be written to the file\&.
.sp
\fIcount\fR is the number of sample frames to be written\&.
.SH "RETURN VALUE"
.sp
afWriteFrames returns the number of sample frames successfully written to \fIfile\fR\&.
.SH "ERRORS"
.sp
afWriteFrames can produce these errors:
.PP
AF_BAD_FILEHANDLE
.RS 4
the file handle was invalid
.RE
.PP
AF_BAD_TRACKID
.RS 4
the track is not
AF_DEFAULT_TRACK
.RE
.PP
AF_BAD_WRITE
.RS 4
writing audio data to the file failed
.RE
.PP
AF_BAD_LSEEK
.RS 4
seeking within the file failed
.RE
.SH "SEE ALSO"
.sp
\fBafReadFrames\fR(3)
.SH "AUTHOR"
.sp
Michael Pruett