summaryrefslogtreecommitdiff
path: root/common/JackConstants.h
blob: 40a00b46ed9d4d9bb76bd83551e6f6ba7f8ff83b (plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
 Copyright (C) 2004-2008 Grame

 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., 675 Mass Ave, Cambridge, MA 02139, USA.

*/

#ifndef __JackConstants__
#define __JackConstants__

#include "types.h"

namespace Jack
{

#define VERSION "0.71"

#define FORK_SERVER 1

#define BUFFER_SIZE_MAX 8192

#define JACK_PORT_NAME_SIZE 256
#define JACK_PORT_TYPE_SIZE 32

#define JACK_CLIENT_NAME_SIZE 64

#define FIRST_AVAILABLE_PORT 1
#define PORT_NUM 512
#define PORT_NUM_FOR_CLIENT 256

#define CONNECTION_NUM 256

#define CLIENT_NUM 64

#define AUDIO_DRIVER_REFNUM   0						// Audio driver is initialized first, it will get the refnum 0
#define FREEWHEEL_DRIVER_REFNUM   1					// Freewheel driver is initialized second, it will get the refnum 1
#define LOOPBACK_DRIVER_REFNUM   2					// Loopback driver is initialized third, it will get the refnum 2
#define REAL_REFNUM LOOPBACK_DRIVER_REFNUM + 1		// Real clients start at LOOPBACK_DRIVER_REFNUM + 1

#define SOCKET_TIME_OUT 5

#ifdef WIN32
	#define jack_server_dir "server"
	#define jack_client_dir "client"
	#define ADDON_DIR "jackmp"
#elif __APPLE__
	#define jack_server_dir "/tmp"
	#define jack_client_dir "/tmp"
	#define JACK_DEFAULT_DRIVER "coreaudio"
#else
	#define jack_server_dir "/dev/shm"
	#define jack_client_dir "/dev/shm"
	#define JACK_DEFAULT_DRIVER "alsa"
#endif

#define jack_server_entry "jackdmp_entry"
#define jack_client_entry "jack_client"

#define ALL_CLIENTS -1 // for notification

#if defined(__ppc64__) || defined(__x86_64__)
	#define JACK_PROTOCOL_VERSION 4
#else
	#define JACK_PROTOCOL_VERSION 3
#endif

#define DRIVER_OPEN_TIMEOUT 5   // in sec

#define NO_PORT   0xFFFE

#define EMPTY   0xFFFD
#define FREE	0xFFFC

} // end of namespace

#endif