File: xsynth.h

package info (click to toggle)
xsynth-dssi 0.9.4-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 2,152 kB
  • ctags: 776
  • sloc: sh: 10,156; ansic: 10,132; makefile: 77
file content (75 lines) | stat: -rw-r--r-- 2,509 bytes parent folder | download | duplicates (3)
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
/* Xsynth DSSI software synthesizer plugin
 *
 * Copyright (C) 2004, 2009 Sean Bolton and others.
 *
 * Portions of this file may have come from Chris Cannam and Steve
 * Harris's public domain DSSI example code.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be
 * useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA.
 */

#ifndef _XSYNTH_H
#define _XSYNTH_H

/* ==== debugging ==== */

/* XSYNTH_DEBUG bits */
#define XDB_DSSI   1   /* DSSI interface */
#define XDB_AUDIO  2   /* audio output */
#define XDB_NOTE   4   /* note on/off, voice allocation */
#define XDB_DATA   8   /* plugin patchbank handling */
#define GDB_MAIN  16   /* GUI main program flow */
#define GDB_OSC   32   /* GUI OSC handling */
#define GDB_IO    64   /* GUI patch file input/output */
#define GDB_GUI  128   /* GUI GUI callbacks, updating, etc. */

/* If you want debug information, define XSYNTH_DEBUG to the XDB_* bits you're
 * interested in getting debug information about, bitwise-ORed together.
 * Otherwise, leave it undefined. */
// #define XSYNTH_DEBUG (1+8+16+32+64)

#ifdef XSYNTH_DEBUG

#include <stdio.h>
#define XSYNTH_DEBUG_INIT(x)
#define XDB_MESSAGE(type, fmt...) { if (XSYNTH_DEBUG & type) fprintf(stderr, "xsynth-dssi.so" fmt); }
#define GDB_MESSAGE(type, fmt...) { if (XSYNTH_DEBUG & type) fprintf(stderr, "Xsynth_gtk" fmt); }
// -FIX-:
// #include "message_buffer.h"
// #define XSYNTH_DEBUG_INIT(x)  mb_init(x)
// #define XDB_MESSAGE(type, fmt...) { \-
//     if (XSYNTH_DEBUG & type) { \-
//         char _m[256]; \-
//         snprintf(_m, 255, fmt); \-
//         add_message(_m); \-
//     } \-
// }

#else  /* !XSYNTH_DEBUG */

#define XDB_MESSAGE(type, fmt...)
#define GDB_MESSAGE(type, fmt...)
#define XSYNTH_DEBUG_INIT(x)

#endif  /* XSYNTH_DEBUG */

/* ==== end of debugging ==== */

#define XSYNTH_MAX_POLYPHONY     64
#define XSYNTH_DEFAULT_POLYPHONY  4

#endif /* _XSYNTH_H */