*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> audio/ALseterrorhandler (3d)              
Title
Content
Arch
Section
 

Contents


ALseterrorhandler(3dm)					ALseterrorhandler(3dm)


NAME    [Toc]    [Back]

     ALseterrorhandler - (obsolete) establish an alternate audio error
     handling routine

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audio.h>

     ALerrfunc ALseterrorhandler(ALerrfunc efunc)    [Toc]    [Back]

PARAMETER    [Toc]    [Back]

     efunc	 expects a pointer to an error handling	routine	declared as
		 void errorfunc(long, const char*, ...)

DESCRIPTION    [Toc]    [Back]

     ALseterrorhandler is obsolete and is provided for backward	compatibility.
     The preferred function is alSetErrorHandler(3dm).	Note that the default
     error handler is now none;	you must call alSetErrorHandler	to establish
     one.

     The Audio Library provides	a default error	handling routine which prints
     diagnostic	messages whenever an error occurs in a library call.

     ALseterrorhandler(3dm) allows you to override the default error handling
     routine.

     The arguments that	are passed to the error	handling routine are an	error
     code and a	printf-like string perhaps followed with printf-like
     arguments.

     The returned value	is a pointer to	the previous error handling routine.

     Setting efunc to 0	prevents any error handling routine from being called;
     in	this case, the application should check	for errors by examining	the AL
     function return values.  Unless printed warnings are desired, we
     recommend disabling the error handling function and testing for errors
     within the	application.

EXAMPLE    [Toc]    [Back]

	       #include	<dmedia/audio.h>
	       ALerrfunc originalErrorHandler;
	       ...

	       originalErrorHandler = ALseterrorhandler(0);
	       /* AL errors here will go unnoticed */
	       ...

	       ALseterrorhandler(originalErrorHandler);
	       /* back to normal reporting of AL errors	*/

	       ...





									Page 1






ALseterrorhandler(3dm)					ALseterrorhandler(3dm)


SEE ALSO    [Toc]    [Back]

      
      
     stdarg(5)
alSetErrorHandler(3dm)					alSetErrorHandler(3dm)


NAME    [Toc]    [Back]

     alSetErrorHandler - establish an alternate	audio error handling routine

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/audio.h>

     ALerrfunc alSetErrorHandler(ALerrfunc efunc)    [Toc]    [Back]

PARAMETER    [Toc]    [Back]

     efunc	 expects a pointer to an error handling	routine	declared as
		 void errorfunc(int, const char*, ...)

DESCRIPTION    [Toc]    [Back]

     By	default, the Audio Library handles errors silently, returning a
     failure code to the caller. alSetErrorHandler(3dm)	allows you to install
     an	error handling routine which is	called in the event of an error	in an
     Audio Library call. This error handler can	be a function in the
     application or a default error handler provided by	the AL.

     Two special values	are accepted for efunc.	If efunc is 0, errors are
     handled silently and no error handler is called. This is the default
     behavior. If efunc	is AL_PRINT_ERRORS, the	AL installs a simple internal
     error handler which prints	a message to stderr.  This was the default
     behavior in older versions	of the AL. If efunc is neither of these
     values, it	is assumed to be a pointer to a	function provided by the
     caller.

     The arguments that	are passed to the error	handling routine are an	error
     code and a	printf-like string perhaps followed with printf-like
     arguments.

     The returned value	is a pointer to	the previous value of efunc.

EXAMPLE    [Toc]    [Back]

	  #include <dmedia/audio.h>

	  static void
	  myerror(int code, const char*	fmt, ...)
	  {
	      /* do something with code	*/
	  }

	  void example()
	  {
	      ALerrfunc	originalErrorHandler;
	      ...

	      /* set up	myerror	as the error handler */
	      originalErrorHandler = alSetErrorHandler(myerror);

	      /* do some audio stuff here */




									Page 1






alSetErrorHandler(3dm)					alSetErrorHandler(3dm)



	      alSetErrorHandler(originalErrorHandler);
	      /* back to normal	behavior: errors are ignored */

	      ...
	  }


SEE ALSO    [Toc]    [Back]

      
      
     stdarg(5)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
alSetErrorHandler IRIX establish an alternate audio error handling routine
clSetErrorHandler IRIX Select an alternate error handling routine
AFseterrorhandler IRIX supply an alternate error reporting routine to the Audio File Library
spclos IRIX obsolete routine
shaderange IRIX obsolete routine
setshade IRIX obsolete routine
rgbcursor IRIX obsolete routine
normal IRIX obsolete routine
ismex IRIX obsolete routine
winattach IRIX obsolete routine
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service