Add compile time option for maximum ports per application.
[jack2.git] / common / JackConstants.h
bloba8861d9ab615ec50ac7389e93937f3468f177838
1 /*
2 Copyright (C) 2004-2008 Grame
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __JackConstants__
21 #define __JackConstants__
23 #ifdef HAVE_CONFIG_H
24 #include "config.h"
25 #endif
27 #define VERSION "1.9.3"
29 #define BUFFER_SIZE_MAX 8192
31 #define JACK_PORT_NAME_SIZE 256
32 #define JACK_PORT_TYPE_SIZE 32
34 #define JACK_CLIENT_NAME_SIZE 64
36 #ifndef PORT_NUM
37 #define PORT_NUM 1024
38 #endif
40 #define DRIVER_PORT_NUM 256
42 #ifndef PORT_NUM_FOR_CLIENT
43 #define PORT_NUM_FOR_CLIENT 512
44 #endif
46 #define FIRST_AVAILABLE_PORT 1
48 #define CONNECTION_NUM_FOR_PORT PORT_NUM_FOR_CLIENT
50 #ifndef CLIENT_NUM
51 #define CLIENT_NUM 64
52 #endif
54 #define AUDIO_DRIVER_REFNUM 0 // Audio driver is initialized first, it will get the refnum 0
55 #define FREEWHEEL_DRIVER_REFNUM 1 // Freewheel driver is initialized second, it will get the refnum 1
57 #define JACK_DEFAULT_SERVER_NAME "default"
59 #ifdef WIN32
60 #define jack_server_dir "server"
61 #define jack_client_dir "client"
62 #define ADDON_DIR "jack"
63 #endif
65 #ifdef __APPLE__
66 #define jack_server_dir "/tmp"
67 #define jack_client_dir "/tmp"
68 #define JACK_DEFAULT_DRIVER "coreaudio"
69 #endif
71 #ifdef __linux__
72 #define jack_server_dir "/dev/shm"
73 #define jack_client_dir "/dev/shm"
74 #define JACK_DEFAULT_DRIVER "alsa"
75 #endif
77 #if defined(__sun__) || defined(sun)
78 #define jack_server_dir "/tmp"
79 #define jack_client_dir "/tmp"
80 #define JACK_DEFAULT_DRIVER "oss"
81 #endif
83 #define jack_server_entry "jackdmp_entry"
84 #define jack_client_entry "jack_client"
86 #define ALL_CLIENTS -1 // for notification
88 #define JACK_PROTOCOL_VERSION 7
90 #define SOCKET_TIME_OUT 5 // in sec
91 #define DRIVER_OPEN_TIMEOUT 5 // in sec
92 #define FREEWHEEL_DRIVER_TIMEOUT 10 // in sec
94 #define NO_PORT 0xFFFE
96 #define EMPTY 0xFFFD
97 #define FREE 0xFFFC
99 #endif