1 /*
2  * Copyright 1993 Network Computing Devices, Inc.
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and its
5  * documentation for any purpose is hereby granted without fee, provided that
6  * the above copyright notice appear in all copies and that both that
7  * copyright notice and this permission notice appear in supporting
8  * documentation, and that the name Network Computing Devices, Inc. not be
9  * used in advertising or publicity pertaining to distribution of this
10  * software without specific, written prior permission.
11  *
12  * THIS SOFTWARE IS PROVIDED `AS-IS'.  NETWORK COMPUTING DEVICES, INC.,
13  * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
14  * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
15  * PARTICULAR PURPOSE, OR NONINFRINGEMENT.  IN NO EVENT SHALL NETWORK
16  * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
17  * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA,
18  * OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF
19  * WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT OF OR IN
20  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21  *
22  * $NCDId: @(#)ausun.h,v 1.4 1994/04/27 17:50:09 greg Exp $
23  */
24 
25 #ifndef _AUSUN_H_
26 #define _AUSUN_H_
27 
28 #define VENDOR_STRING           ausunVendorString
29 #define VENDOR_RELEASE          1
30 
31 #ifndef _AUSUN_C_
32 extern char *VENDOR_STRING;
33 #endif /* !_AUSUN_C_ */
34 
35 /*
36  * NOTE: The native format endianess should match that of the machine
37  * running the audio server.
38  */
39 #define auNativeFormat          AuFormatLinearSigned16MSB
40 #define auNativeBytesPerSample  2
41 
42 #include <signal.h>
43 
44 typedef int AuBlock;
45 #if defined(SYSV) || defined(SVR4)
46 #define AuUnBlockAudio(_x)                                                    \
47 do                                                                            \
48 {                                                                             \
49     if ((int) (_x) != (int) SIG_HOLD)                                         \
50         (void) sigset(SIGPOLL, (void (*)(int))(_x));                          \
51 } while(0)
52 
53 #define AuBlockAudio()          (int) sigset(SIGPOLL, SIG_HOLD)
54 #else
55 #define AuUnBlockAudio(_x)      sigsetmask(_x)
56 #define AuBlockAudio()          sigblock(sigmask(SIGPOLL))
57 #endif
58 #define AuProtectedMalloc(_s)   xalloc(_s)
59 #define AuProtectedFree(_p)     free(_p)
60 
61 #endif /* !_AUSUN_H_ */
62