NAME
irOpen - open a voice file
SYNOPSIS
#include <irapi.h>
vf_descriptor irOpen (const char *voice_file, int oflag, int
mode);
DESCRIPTION
The irOpen function opens a named voice_file for access by
other IRAPI functions [such as irPlay(3IRAPI),
irRecord(3IRAPI), and irLSeek(3IRAPI)]. The function
returns voice file descriptor (vfd) that is used by these
voice routines.
See open(2) for a description and values of oflag and mode.
Note, however, that with open(2), mode is optional whereas
with irOpen it is required.
See IrPARAMETERS(4IRAPI) for a discussion of IRP_CREATE_MODE
and IRP_CREATE_FLAG used when creating new files via
irRecord(3IRAPI).
Calls to irPlay(3IRAPI) or irRecord(3IRAPI) fail if the vfd
has not been opened in a manner appropriate for those calls.
EVENT
No event results from the call to irOpen.
RETURN VALUE
This function returns a voice file descriptor (vfd) if suc-
cessful.
IRR_FAIL is returned if an error occurs.
ERROR
irError is set as follows if an error occurs:
IRER_INVALID if voice_file is a NULL pointer or string
IRER_SYSERROR if a system call failure occurs (see
irSysError for additional information)
IRER_OVERFLOW if voice_file is greater than IRD_MAX_FILE_LEN
SEE ALSO
open(2), irClose(3IRAPI), irTruncate(3IRAPI)
VERSION
This is version 8/31/00 of this man page.