Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ASetIOError(3X) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ASetErrorHandler(3X)

AGetErrorText(3X)

ASetIOErrorHandler(3X)

NAME

ASetIOErrorHandler − replace default I/O error handler with specified handler

SYNOPSIS

#include <Alib.h> AIOErrorHandler
ASetIOErrorHandler (

AIOErrorHandler handler );

DESCRIPTION

ASetIOErrorHandler() replaces the default I/O error handler with the handler specified in handler, and returns a pointer to the handler that was previously in effect.  When the new handler exits via return, the application program exits. 

This error handler is called when an I/O error occurs inside the Audio Library. 

handler is the pointer to an application-supplied I/O handler function. 

RETURN VALUE

ASetIOErrorHandler() returns a pointer to the handler that was previously in effect. 

ERRORS

ASetIOErrorHandler() does not return an error status. 

EXAMPLE

The following example replaces the default I/O error handler with a handler named my_io_handler. 

long my_io_handler(Audio  ∗ audio)

{

    printf ("An I/O Error Occurred!\n");

    return 0;

}
.
.
.

AIOErrorHandler prev_io_handler;   /∗ ptr to previous handler ∗/
.
.
.

/∗ replace default I/O error handler ∗/

prev_io_handler = ASetIOErrorHandler(my_io_handler);

NOTE

In order to ensure that the compiler finds the Audio Library (libAlib.sl) and the Alib.h header file, you must add the following switches:

-L /opt/audio/lib
-I/opt/audio/include

DEPENDENCIES

This function belongs to the Audio Library of functions that manage connections to an audio server.  The audio server must run on a system that has audio hardware. To find out whether or not your system has audio hardware, refer to Using the Audio Developer’s Kit or the online help for the Audio control panel.  For information about the audio capabilities of a particular system use the online example audioinfo.c. 

AUTHOR

ASetIOErrorHandler() was developed by HP. 

SEE ALSO

ASetErrorHandler(3X), AGetErrorText(3X). 

Hewlett-Packard Company  —  Audio Library: February, 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026