AGetErrorText(3X)
NAME
AGetErrorText − copy error description into specified buffer
SYNOPSIS
#include <Alib.h> void
AGetErrorText (
Audio ∗ audio,
AError error,
char ∗ buffer_return,
int
DESCRIPTION
AGetErrorText() copies the description for the error specified in error to the buffer specified in buffer_return. The error description is a null-terminated string.
audio specifies the Audio structure associated with this connection.
error specifies the type of error. One of the following values:
AENoError AESystemCall
AEBadAudio AEBadValue
AEHostNotFound AENoSuchAudioNumber
AEBadFileFormat AEBadDataFormat
AEFileNotFound AEBadLinkID
AEBadGainMatrix AEBadFileHdr
AEUnrecognizableFormat AEBadAttribute
AEBadOffset AEBadTransactionID
AECantDetermineFormat AEOutOfMemory
AEOpenFailed AEBadSamplingRate
AEBadSoundBucket AEBadSoundStream
AETransactionBusy AEllbdNotStarted
AERPCFailed AELibraryMismatch
AEServerAccessDenied AEFunctionUnimplemented
buffer_return receives the error description.
buffer_length specifies the size of buffer_return.
ERRORS
AGetErrorText() does not return an error status.
EXAMPLE
The following example gets the error description for AEBadOffset and returns it in buffer_return.
#define TEXT_LENGTH 256
Audio ∗ audio; /∗ audio connection ∗/
AError err; /∗ type of error ∗/
char buffer_return[TEXT_LENGTH]; /∗ buffer for descrip. ∗/
.
.
.
/∗ get error description ∗/
err = AEBadOffset;
AGetErrorText(audio, err, &buffer_return, TEXT_LENGTH);
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
AGetErrorText() was developed by HP.
SEE ALSO
ASetErrorHandler(3X), ASetIOErrorHandler(3X).
Hewlett-Packard Company — Audio Library: February, 1995