Annotation of src/usr.bin/aucat/conf.h, Revision 1.9
1.9 ! ratchov 1: /* $OpenBSD: conf.h,v 1.8 2009/07/25 10:52:18 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: /*
1.8 ratchov 21: * Debug trace levels:
1.1 ratchov 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: extern int debug_level;
33:
34: #define DPRINTF(...) DPRINTFN(1, __VA_ARGS__)
35: #define DPRINTFN(n, ...) \
36: do { \
37: if (debug_level >= (n)) \
38: fprintf(stderr, __VA_ARGS__); \
39: } while(0)
40: #else
41: #define DPRINTF(...) do {} while(0)
42: #define DPRINTFN(n, ...) do {} while(0)
43: #endif
44:
1.4 ratchov 45: /*
1.8 ratchov 46: * Number of blocks in the device play/record buffers. Because Sun API
1.4 ratchov 47: * cannot notify apps of the current positions, we have to use all N
48: * buffers devices blocks plus one extra block, to make write() block,
49: * so that poll() can return the exact postition.
50: */
51: #define DEV_NBLK 2
52:
53: /*
1.8 ratchov 54: * Number of blocks in the wav-file i/o buffers.
1.4 ratchov 55: */
56: #define WAV_NBLK 6
57:
1.9 ! ratchov 58: /*
! 59: * socket and option names
! 60: */
1.7 ratchov 61: #define DEFAULT_MIDITHRU "midithru"
62: #define DEFAULT_SOFTAUDIO "softaudio"
63: #define DEFAULT_OPT "default"
1.9 ! ratchov 64:
! 65: /*
! 66: * MIDI buffer size
! 67: */
! 68: #define MIDI_BUFSZ 3125 /* 1 second */
1.1 ratchov 69:
70: #endif /* !defined(CONF_H) */