[BACK]Return to conf.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / aucat

Annotation of src/usr.bin/aucat/conf.h, Revision 1.5

1.5     ! ratchov     1: /*     $OpenBSD: conf.h,v 1.4 2008/10/26 08:49:43 ratchov Exp $        */
1.1       ratchov     2: /*
                      3:  * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
                      4:  *
                      5:  * Permission to use, copy, modify, and distribute this software for any
                      6:  * purpose with or without fee is hereby granted, provided that the above
                      7:  * copyright notice and this permission notice appear in all copies.
                      8:  *
                      9:  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     10:  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     11:  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     12:  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     13:  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     14:  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     15:  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
                     16:  */
1.3       ratchov    17: #ifndef CONF_H
                     18: #define CONF_H
1.1       ratchov    19:
                     20: /*
                     21:  * debug trace levels:
                     22:  *
                     23:  * 0 - traces are off
                     24:  * 1 - init, free, stuff that's done only once
                     25:  * 2 - rare real-time events: eof / hup, etc...
                     26:  * 3 - poll(), block / unblock state changes
                     27:  * 4 - read()/write()
                     28:  */
                     29: #ifdef DEBUG
                     30:
                     31: /* defined in main.c */
                     32: void debug_printf(int, char *, char *, ...);
                     33: extern int debug_level;
                     34:
                     35: #define DPRINTF(...) DPRINTFN(1, __VA_ARGS__)
                     36: #define DPRINTFN(n, ...)                                       \
                     37:        do {                                                    \
                     38:                if (debug_level >= (n))                         \
                     39:                        fprintf(stderr, __VA_ARGS__);           \
                     40:        } while(0)
                     41: #else
                     42: #define DPRINTF(...) do {} while(0)
                     43: #define DPRINTFN(n, ...) do {} while(0)
                     44: #endif
                     45:
1.4       ratchov    46: /*
                     47:  * number of blocks in the device play/record buffers.  because Sun API
                     48:  * cannot notify apps of the current positions, we have to use all N
                     49:  * buffers devices blocks plus one extra block, to make write() block,
                     50:  * so that poll() can return the exact postition.
                     51:  */
                     52: #define DEV_NBLK 2
                     53:
                     54: /*
                     55:  * number of blocks in the wav-file i/o buffers
                     56:  */
                     57: #define WAV_NBLK 6
                     58:
1.1       ratchov    59: #define DEFAULT_DEVICE "/dev/audio"    /* defaul device */
1.4       ratchov    60: #define DEFAULT_SOCKET "/tmp/aucat.sock"
1.1       ratchov    61:
                     62: #endif /* !defined(CONF_H) */