1 Debian patch touch this file
| •1 | /* $Id: config.h.in,v 1.4 1999/06/09 06:25:20 boyns Exp $ -*- c -*- */ |
| 2 | |
| 3 | /* |
| 4 | * Copyright (C) 1993-99 Mark R. Boyns <[email protected]> |
| 5 | * |
| 6 | * This file is part of rplay. |
| 7 | * |
| 8 | * rplay is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * rplay is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with rplay; see the file COPYING. If not, write to the |
| 20 | * Free Software Foundation, Inc., |
| 21 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. |
| 22 | */ |
| 23 | |
| 24 | |
| 25 | #ifndef _config_add_bottom_h |
| 26 | #define _config_add_bottom_h |
| 27 | |
| 28 | #undef SVR4 |
| 29 | |
| 30 | /* |
| 31 | * rplayd user and group privs. (default unset) |
| 32 | * |
| 33 | * Example: |
| 34 | * #define RPLAYD_USER "nobody" |
| 35 | * #define RPLAYD_GROUP "audio" |
| 36 | */ |
| 37 | #undef RPLAYD_USER |
| 38 | #undef RPLAYD_GROUP |
| 39 | |
| 40 | /* |
| 41 | * Use host authentication. |
| 42 | */ |
| 43 | #define AUTH |
| 44 | |
| 45 | /* |
| 46 | * Support rplay 2.0 packets. If you define this then you |
| 47 | * should also define OLD_RPLAY_PORTS below. |
| 48 | */ |
| 49 | #define OLD_RPLAY |
| 50 | |
| 51 | /* |
| 52 | * Support older RPLAY port 55555 and RPTP port 55556. |
| 53 | * This option really enables support for 2 RPLAY ports and 2 RPTP ports |
| 54 | * which default to 5555/55555 for RPLAY and 5556/55556 for RPTP. |
| 55 | */ |
| 56 | #define OTHER_RPLAY_PORTS |
| 57 | |
| 58 | /* |
| 59 | * Maximum number of sounds that can be playing at once. |
| 60 | */ |
| 61 | #define SPOOL_SIZE 12 |
| 62 | |
| 63 | /* |
| 64 | * The size of rplayd's internal sound hash table. |
| 65 | */ |
| 66 | #define MAX_SOUNDS 4001 /* yes that is a prime number */ |
| 67 | |
| 68 | /* |
| 69 | * Should rplayd log by default? |
| 70 | */ |
| 71 | /* #define RPLAYD_ALWAYS_LOG */ |
| 72 | |
| 73 | /* |
| 74 | * Define the default rplayd logging level: |
| 75 | * 1 - System and rplayd errors. |
| 76 | * 2 - + RPTP connections, get, put, find. |
| 77 | * 3 - + play, stop, pause, continue, etc. |
| 78 | * 4 - + Debug messages. |
| 79 | * |
| 80 | * Note that the logging level can also be specified with |
| 81 | * rplayd command line options. This is only used if |
| 82 | * RPLAYD_ALWAYS_LOG is defined above. |
| 83 | */ |
| 84 | #define RPLAYD_LOG_LEVEL 1 |
| 85 | |
| 86 | /* |
| 87 | * By default, rplayd will never timeout. If you would rather |
| 88 | * have rplayd exit after some period of idle time, change the zero |
| 89 | * below to the appropriate number of seconds. |
| 90 | * |
| 91 | * NOTE: This value used to be 360 instead of 0. |
| 92 | */ |
| 93 | #define RPLAYD_TIMEOUT 0 /* seconds */ |
| 94 | |
| 95 | /* |
| 96 | * Maximum size of the rplay.cache directory. |
| 97 | * |
| 98 | * The size you choose should at least be big enough to hold the |
| 99 | * largest sound you plan on playing. Note that this is the disk |
| 100 | * cache and not the memory cache which is mentioned below. |
| 101 | */ |
| 102 | #define RPLAY_CACHE_SIZE (8*1024*1024) |
| 103 | |
| 104 | /* |
| 105 | * Memory cache. |
| 106 | * |
| 107 | * Sounds are cached using mmap (if available) or malloc (no mmap). |
| 108 | * Non-cached sounds are read piece by piece. |
| 109 | * |
| 110 | * MEMORY_CACHE_SOUND_SIZE - maximum size of a sound that can be cached in memory. |
| 111 | * MEMORY_CACHE_SIZE - maximum size of the entire memory cache. |
| 112 | * |
| 113 | * Setting MEMORY_CACHE_SIZE=0 will disable the memory cache. |
| 114 | */ |
| 115 | #define MEMORY_CACHE_SOUND_SIZE (2*1024*1024) |
| 116 | #define MEMORY_CACHE_SIZE (4*1024*1024) |
| 117 | |
| 118 | /* |
| 119 | * Delay time between RPTP server pings. |
| 120 | */ |
| 121 | #define RPTP_PING_DELAY 5 |
| 122 | |
| 123 | /* |
| 124 | * Number of times to try and connect to an RPTP server. |
| 125 | */ |
| 126 | #define RPTP_CONNECT_ATTEMPTS 3 |
| 127 | |
| 128 | /* |
| 129 | * Close RPTP connections after 300 idle seconds (disabled with zero). |
| 130 | */ |
| 131 | #define RPTP_CONNECTION_TIMEOUT 300 |
| 132 | |
| 133 | /* |
| 134 | * Maximum number of RPTP client connections (disabled with zero). |
| 135 | */ |
| 136 | #define RPTP_MAX_CONNECTIONS 16 |
| 137 | |
| 138 | /* |
| 139 | * Enable simulated hardware volume control. |
| 140 | */ |
| 141 | /* #define FAKE_VOLUME */ |
| 142 | |
| 143 | /* |
| 144 | * Enable the automatic re-reading of rplayd's configuration files when |
| 145 | * they are modified. |
| 146 | */ |
| 147 | #define AUTO_REREAD |
| 148 | |
| 149 | /* |
| 150 | * The maximum sample rate that rplayd will/can ever output. |
| 151 | */ |
| 152 | #define MAX_SAMPLE_RATE 48000 /* 48000 Hz */ |
| 153 | |
| 154 | /* |
| 155 | * A list of directories that cannot be accessed to obtain sound files. |
| 156 | * This feature can be disabled using `#undef BAD_DIRS'. |
| 157 | */ |
| 158 | #define BAD_DIRS "/dev:/etc:/devices:/proc" |
| 159 | |
| 160 | #define HAVE_ADPCM |
| 161 | #define HAVE_GSM |
| 162 | #undef HAVE_CDROM |
| 163 | #undef HAVE_CDDA |
| 164 | |
| 165 | #if defined (sun) && defined (SVR4) /* Solaris 2.x */ |
| 166 | #define HAVE_CDROM |
| 167 | #define HAVE_CDDA |
| 168 | #endif /* Solaris 2.x */ |
| 169 | |
| 170 | #if defined (linux) |
| 171 | #define HAVE_OSS |
| 172 | #define HAVE_CDROM |
| 173 | #endif |
| 174 | |
| 175 | #define HAVE_HELPERS |
| 176 | |
| 177 | /* Convert HAVE_ to HAS_ for gsm. See gsm/include/config.h.gsm */ |
| 178 | #ifdef HAVE_STDLIB_H |
| 179 | #define HAS_STDLIB_H |
| 180 | #endif |
| 181 | |
| 182 | #ifdef HAVE_LIMITS_H |
| 183 | #define HAS_LIMITS_H |
| 184 | #endif |
| 185 | |
| 186 | #ifdef HAVE_FCNTL_H |
| 187 | #define HAS_FCNTL_H |
| 188 | #endif |
| 189 | |
| 190 | #ifdef HAVE_FSTAT |
| 191 | #define HAS_FSTAT |
| 192 | #endif |
| 193 | |
| 194 | #ifdef HAVE_FCHOWN |
| 195 | #define HAS_FCHOWN |
| 196 | #endif |
| 197 | |
| 198 | #ifdef HAVE_STRING_H |
| 199 | #define HAS_STRING_H |
| 200 | #endif |
| 201 | |
| 202 | #ifdef HAVE_STRINGS_H |
| 203 | #define HAS_STRINGS_H |
| 204 | #endif |
| 205 | |
| 206 | #ifdef HAVE_UNISTD_H |
| 207 | #define HAS_UNISTD_H |
| 208 | #endif |
| 209 | |
| 210 | #ifdef HAVE_UTIME |
| 211 | #define HAS_UTIME |
| 212 | #endif |
| 213 | |
| 214 | #ifdef HAVE_UTIMES |
| 215 | #define HAS_UTIMES |
| 216 | #endif |
| 217 | |
| 218 | #ifdef HAVE_UTIME_H |
| 219 | #define HAS_UTIMES_H |
| 220 | #endif |
| 221 | |
| 222 | /* |
| 223 | * Maximum UDP packet size. |
| 224 | */ |
| 225 | #define MAX_PACKET 8192 |
| 226 | |
| 227 | /* |
| 228 | * Solaris 2.x using gcc or SunPro cc and HP-UX |
| 229 | */ |
| 230 | #if (defined(sun) && (defined(__svr4__) || defined(SVR4))) || defined(__hpux) |
| 231 | #ifndef HAVE_RANDOM |
| 232 | #define random() lrand48() |
| 233 | #endif |
| 234 | #ifndef HAVE_SRANDOM |
| 235 | #define srandom(x) srand48(x) |
| 236 | #endif |
| 237 | #endif |
| 238 | |
| 239 | #ifndef MIN |
| 240 | #define MIN(a,b) (((a)<(b))?(a):(b)) |
| 241 | #endif |
| 242 | |
| 243 | #ifndef MAX |
| 244 | #define MAX(a,b) (((a)>(b))?(a):(b)) |
| 245 | #endif |
| 246 | |
| 247 | #ifndef HAVE_MEMMOVE |
| 248 | #define memmove(d, s, n) bcopy ((s), (d), (n)) |
| 249 | #endif |
| 250 | |
| 251 | #ifdef HAVE_SNPRINTF |
| 252 | #define SNPRINTF snprintf |
| 253 | #else |
| 254 | #define SNPRINTF sprintf |
| 255 | #endif |
| 256 | |
| 257 | #ifdef HAVE_VSNPRINTF |
| 258 | #define VSNPRINTF vsnprintf |
| 259 | #else |
| 260 | #define VSNPRINTF vsprintf |
| 261 | #endif |
| 262 | |
| 263 | #if defined(HAVE_SNPRINTF) || defined(HAVE_VSNPRINTF) |
| 264 | #define SIZE(buf, n) buf,n |
| 265 | #else |
| 266 | #define SIZE(buf, n) buf |
| 267 | #endif |
| 268 | |
| 269 | #ifndef RPLAY_VERSION |
| 270 | #define RPLAY_VERSION "" |
| 271 | #endif |
| 272 | |
| 273 | #endif /* _config_add_bottom_h */ |