1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
/*
Y Sound Systems
Client to Server Protocol Definations
Any Y client program needs to #include this file and link to
the library libY2.
For contact and programming information, see:
http://fox.mit.edu/xsw/yiff
*/
#ifndef Y_H
#define Y_H
#include <db.h>
#include <sys/types.h>
/*
* Basic True and False:
*/
#ifndef False
# define False 0
#endif
#ifndef True
# define True 1
#endif
/*
* Types:
*/
typedef char Boolean;
typedef unsigned long YID;
typedef unsigned long YMask;
typedef double Coefficient;
typedef long YDataPosition;
typedef long YDataLength;
/* IP address union. */
typedef union {
u_int32_t whole;
u_int8_t charaddr[4];
} YIPUnion;
/*
* All purpose NULL YID:
*/
#define YIDNULL (YID)0
/*
* Full path to disk object name max:
*/
#define YPathMax 1024
/*
* Maximum audio mode name length:
*/
#define YAudioNameMax 256
/*
* Maximum vendor name length:
*/
#define YVendorNameMax 64
/*
* Network data receive buffer:
*
* This value must be able to hold several network data segments,
* each segment should not be bigger than about 1000 bytes at most.
* So 30000 bytes could hold about 30 huge events. Though most event
* segments are only about 100 bytes or less though.
*/
#define YNetRecvBufLen 30000
/*
* Maximum allowed queued YIFF events per (client) connection:
*
* Note that the number of queued events per connection
* is allocated to match the number queued events. The entire
* number of YQueuedEventsMax queued events is not allocated
* initially.
*/
#define YQueuedEventsMax 500
/*
* Number of values per mixer channel device:
*/
#define YMixerValues 2
/*
* Sound object data format type codes:
*
* This indicates the type of data the sound object contains
* and the type of sound object itself.
*
* They are not the format types of the sound object as a
* file on non-volatile storage (ie on disk).
*/
#define SndObjTypeNone 0
#define SndObjTypeDSP 1 /* Digital audio sample. */
#define SndObjTypeMIDI 2
/*
* Major operation codes (also YEvent types):
*/
#define YAudioChange 1
# define YAudioChangePreset 0
# define YAudioChangeValues 1
#define YCycleChange 2
#define YDisconnect 3
#define YSetHost 4
# define YSetHostAdd 0
# define YSetHostRemove 1
#define YListHosts 5
# define YListHostsGet 0
# define YListHostsSet 1
#define YMixerChannel 6
# define YMixerChannelGet 0
# define YMixerChannelSet 1
#define YListMixers 7
# define YListMixersGet 0
# define YListMixersSet 1
#define YSoundObjectPlay 8
#define YSoundObjectKill 9
#define YSoundObjectAttributes 10
# define YSoundObjectAttributesGet 0
# define YSoundObjectAttributesSet 1
#define YShutdown 11
#define YSync 12
#define YAudioStats 13 /* Audio device stats. */
# define YAudioStatsGet 0
# define YAudioStatsSet 1
#define YServerStats 14
# define YServerStatsGet 0
# define YServerStatsSet 1
#define YListAudioModes 15
# define YListAudioModesGet 0
# define YListAudioModesSet 1
#endif /* Y_H */
|