Merge tag 'v1.9.22' into LADI/main
[jack2.git] / common / JackConstants.h
blobf19b9f8eccd292ca40e4804c47fbf6968415bcf2
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 Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef __JackConstants__
21 #define __JackConstants__
23 #ifdef HAVE_CONFIG_H
24 #include "config.h"
25 #endif
27 #define VERSION "2.22.0"
29 #define BUFFER_SIZE_MAX 8192
31 #define JACK_PORT_NAME_SIZE 256
32 #define JACK_PORT_TYPE_SIZE 32
34 #define JACK_SERVER_NAME_SIZE 256
35 #define JACK_CLIENT_NAME_SIZE 64
36 #define JACK_MESSAGE_SIZE 256
37 #define JACK_UUID_SIZE 36 // to match jack1 and uuid.h
38 #define JACK_UUID_STRING_SIZE (JACK_UUID_SIZE+1) /* includes trailing null */
39 #define JACK_UUID_EMPTY_INITIALIZER 0
40 #define JACK_SESSION_COMMAND_SIZE 256
42 #define SYNC_MAX_NAME_SIZE 256
44 #define REAL_JACK_PORT_NAME_SIZE JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE // full name like "client_name:short_port_name"
46 #ifndef PORT_NUM
47 #define PORT_NUM 2048
48 #endif
50 #ifndef PORT_NUM_MAX
51 #define PORT_NUM_MAX 4096 // The "max" value for ports used in connection manager, although port number in graph manager is dynamic
52 #endif
54 #define DRIVER_PORT_NUM 256
56 #ifndef PORT_NUM_FOR_CLIENT
57 #define PORT_NUM_FOR_CLIENT 768
58 #endif
60 #define FIRST_AVAILABLE_PORT 1
62 #define CONNECTION_NUM_FOR_PORT PORT_NUM_FOR_CLIENT
64 #ifndef CLIENT_NUM
65 #define CLIENT_NUM 64
66 #endif
68 #define AUDIO_DRIVER_REFNUM 0 // Audio driver is initialized first, it will get the refnum 0
69 #define FREEWHEEL_DRIVER_REFNUM 1 // Freewheel driver is initialized second, it will get the refnum 1
71 #define JACK_DEFAULT_SERVER_NAME "default"
73 #define ALL_CLIENTS -1 // for notification
75 #define JACK_PROTOCOL_VERSION 9
77 #define SOCKET_TIME_OUT 2 // in sec
78 #define DRIVER_OPEN_TIMEOUT 5 // in sec
79 #define FREEWHEEL_DRIVER_TIMEOUT 10 // in sec
80 #define DRIVER_TIMEOUT_FACTOR 10
82 #define JACK_SERVER_FAILURE "JACK server has been closed"
84 #define NO_PORT 0xFFFE
86 #define EMPTY 0xFFFD
87 #define FREE 0xFFFC
89 #define JACK_DEFAULT_SELF_CONNECT_MODE ' ' /* allow all requests */
91 #endif