Sophie

Sophie

distrib > Momonga > development > i686 > media > os > by-pkgid > e55f681868c9f18bfbad2ffa5b693750 > files > 24

audiofile-0.3.1-1m.mo8.i686.rpm

'\" t
.\"     Title: afOpenFile
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\"      Date: 09/18/2011
.\"    Manual: \ \&
.\"    Source: Audio File Library 0.3.1
.\"  Language: English
.\"
.TH "AFOPENFILE" "3" "09/18/2011" "Audio File Library 0\&.3\&.1" "\ \&"
.\" -----------------------------------------------------------------
.\" * 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"
afOpenFile \- open an audio file and create a file handle structure used for subsequent calls to the Audio File Library
.SH "SYNOPSIS"
.sp
.nf
#include <audiofile\&.h>
.fi
.sp
.nf
AFfilehandle afOpenFile(const char *path, const char *mode,
    AFfilesetup setup);
.fi
.SH "PARAMETERS"
.sp
\fIpath\fR is the path to the file to be opened\&.
.sp
\fImode\fR specifies a mode for opening the file: "r" for reading or "w" for writing\&.
.sp
\fIsetup\fR is an AFfilesetup created by \fBafNewFileSetup\fR(3)\&. This value is ignored for files opened for reading except when the file format is AF_FILE_RAWDATA\&.
.SH "RETURN VALUE"
.sp
Upon success, afOpenFile returns a valid AFfilehandle which can be used in subsequent calls to the Audio File Library\&. Upon failure, afOpenFile returns NULL\&.
.sp
\fBafCloseFile\fR(3) is used to close the file when it is no longer needed\&.
.SH "ERRORS"
.sp
afOpenFile can produce the following errors:
.PP
AF_BAD_OPEN
.RS 4
open failed
.RE
.PP
AF_BAD_READ
.RS 4
read failed
.RE
.PP
AF_BAD_WRITE
.RS 4
write failed
.RE
.PP
AF_BAD_LSEEK
.RS 4
lseek failed
.RE
.PP
AF_BAD_MALLOC
.RS 4
memory allocation failed
.RE
.PP
AF_BAD_FILEFMT
.RS 4
unrecognized file format
.RE
.SH "SEE ALSO"
.sp
\fBafCloseFile\fR(3), \fBafNewFileSetup\fR(3), \fBafInitFileFormat\fR(3), \fBafReadFrames\fR(3), \fBafWriteFrames\fR(3)
.SH "AUTHOR"
.sp
Michael Pruett <michael@68k\&.org>