AGrabServer(3X) — Series 700 Only
NAME
AGrabServer − acquire exclusive use of audio server
SYNOPSIS
#include <audio/Alib.h>
Boolean AGrabServer (Audio *audio, long *status_return);
DESCRIPTION
AGrabServer() acquires exclusive use of the audio server for this connection and returns TRUE unless the server has already been grabbed, in which case it returns FALSE. When the server is grabbed, all requests from other connections are interrupted; they are resumed when the server is released. To release (ungrab) the server, call AUngrabServer().
audio specifies the Audio structure associated with this connection.
status_return receives the returned status of the operation, unless it is set to NULL.
RETURN VALUE
Upon successful completion, AGrabServer() returns TRUE; if the server is already grabbed, the return is FALSE.
ERRORS
If status_return is not set to NULL, one of the following is returned in status_return.
0 AENoError
2 AEBadAudio
EXAMPLES
The following example grabs the server for the connection associated with audio and sets up status to receive an error status.
Boolean grab; /* server acquired */
Audio *audio; /* audio connection */
long status; /* error status */
.
.
.
/* grab server for audio connection */
grab = AGrabServer(audio, &status);
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 the hardware manual that accompanies your system.
AUTHOR
AGrabServer() was developed by HP.
SEE ALSO
Using the Audio Application Program Interface.
Hewlett-Packard Company — HP-UX Release 9.03: April 1994