Annotation of src/usr.bin/aucat/conf.h, Revision 1.2
1.2 ! ratchov 1: /* $OpenBSD: conf.h,v 1.1 2008/05/23 07:15:46 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: */
17: #ifndef ACONF_H
18: #define ACONF_H
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:
46:
47: #define MIDI_MAXCTL 127
48: #define MIDI_TO_ADATA(m) ((ADATA_UNIT * (m) + 64) / 127)
49:
50: #define DEFAULT_NFR 0x400 /* buf size in frames */
1.2 ! ratchov 51: #define DEFAULT_NBLK 0x2 /* blocks per buffer */
1.1 ratchov 52: #define DEFAULT_DEVICE "/dev/audio" /* defaul device */
53:
54: #endif /* !defined(CONF_H) */