JackConstants.h 2.31 KB
Newer Older
sletz's avatar
sletz committed
1
/*
sletz's avatar
sletz committed
2
 Copyright (C) 2004-2008 Grame
sletz's avatar
sletz committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

 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.

*/

20
21
22
#ifndef __JackConstants__
#define __JackConstants__

23
24
25
26
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

sletz's avatar
sletz committed
27
#define VERSION "1.9.3"
sletz's avatar
sletz committed
28
29
30
31
32
33
34
35

#define BUFFER_SIZE_MAX 8192

#define JACK_PORT_NAME_SIZE 256
#define JACK_PORT_TYPE_SIZE 32

#define JACK_CLIENT_NAME_SIZE 64

36
#ifndef PORT_NUM
sletz's avatar
sletz committed
37
#define PORT_NUM 1024
38
39
#endif

40
#define DRIVER_PORT_NUM 256
41
#define PORT_NUM_FOR_CLIENT 512
42
#define FIRST_AVAILABLE_PORT 1
sletz's avatar
sletz committed
43

44
#define CONNECTION_NUM_FOR_PORT 256
sletz's avatar
sletz committed
45

46
#ifndef CLIENT_NUM
sletz's avatar
sletz committed
47
#define CLIENT_NUM 64
48
#endif
sletz's avatar
sletz committed
49

50
51
#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
sletz's avatar
sletz committed
52

sletz's avatar
sletz committed
53
54
#define JACK_DEFAULT_SERVER_NAME "default"

sletz's avatar
sletz committed
55
#ifdef WIN32
sletz's avatar
sletz committed
56
57
#define jack_server_dir "server"
#define jack_client_dir "client"
sletz's avatar
sletz committed
58
#define ADDON_DIR "jack"
sletz's avatar
sletz committed
59
60
61
#endif

#ifdef __APPLE__
sletz's avatar
sletz committed
62
63
64
#define jack_server_dir "/tmp"
#define jack_client_dir "/tmp"
#define JACK_DEFAULT_DRIVER "coreaudio"
sletz's avatar
sletz committed
65
66
67
#endif

#ifdef __linux__
sletz's avatar
sletz committed
68
69
70
#define jack_server_dir "/dev/shm"
#define jack_client_dir "/dev/shm"
#define JACK_DEFAULT_DRIVER "alsa"
sletz's avatar
sletz committed
71
72
#endif

sletz's avatar
sletz committed
73
74
75
76
77
78
#if defined(__sun__) || defined(sun)
#define jack_server_dir "/tmp"
#define jack_client_dir "/tmp"
#define JACK_DEFAULT_DRIVER "oss"
#endif

sletz's avatar
sletz committed
79
80
81
82
#define jack_server_entry "jackdmp_entry"
#define jack_client_entry "jack_client"

#define ALL_CLIENTS -1 // for notification
83

sletz's avatar
sletz committed
84
#define JACK_PROTOCOL_VERSION 7  
sletz's avatar
sletz committed
85

sletz's avatar
Cleanup    
sletz committed
86
87
88
#define SOCKET_TIME_OUT 5               // in sec
#define DRIVER_OPEN_TIMEOUT 5           // in sec
#define FREEWHEEL_DRIVER_TIMEOUT 10     // in sec
89
90
91
92
93
94
95

#define NO_PORT   0xFFFE

#define EMPTY   0xFFFD
#define FREE	0xFFFC

#endif