JackTrip
jacktrip_globals.h
Go to the documentation of this file.
1 //*****************************************************************
2 /*
3  JackTrip: A System for High-Quality Audio Network Performance
4  over the Internet
5 
6  Copyright (c) 2008 Juan-Pablo Caceres, Chris Chafe.
7  SoundWIRE group at CCRMA, Stanford University.
8 
9  Permission is hereby granted, free of charge, to any person
10  obtaining a copy of this software and associated documentation
11  files (the "Software"), to deal in the Software without
12  restriction, including without limitation the rights to use,
13  copy, modify, merge, publish, distribute, sublicense, and/or sell
14  copies of the Software, and to permit persons to whom the
15  Software is furnished to do so, subject to the following
16  conditions:
17 
18  The above copyright notice and this permission notice shall be
19  included in all copies or substantial portions of the Software.
20 
21  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28  OTHER DEALINGS IN THE SOFTWARE.
29 */
30 //*****************************************************************
31 
38 #ifndef __JACKTRIP_GLOBALS_H__
39 #define __JACKTRIP_GLOBALS_H__
40 
41 #include "AudioInterface.h"
42 //#include "JackAudioInterface.h"
43 
45 //namespace JackTrip
46 
47 const char* const gVersion = "1.3.0";
48 
49 //*******************************************************************************
51 
52 const int gDefaultNumInChannels = 2;
53 const int gDefaultNumOutChannels = 2;
54 
55 #define PROTOCOL_STACK QHostAddress::AnyIPv4 // as opposed to Any
56 // #define WAIR_AUDIO_NAME "JackTrip" // for jack connection
57 const QString WAIR_AUDIO_NAME = QString("JackTrip"); // keep legacy for WAIR
58 const int gMAX_WAIRS = 128; // FIXME, should agree with maxThreadCount
59 // jmess revision needed for string parse if > 1 digit
60 
61 // hubpatch = 3 for TUB ensemble patching
63 // test NUC as server
64 //const QString gDOMAIN_TRIPLE = QString("130.149.23"); // for TUB multiclient hub
65 //const int gMIN_TUB = 245; // lowest client address
66 //const int gMAX_TUB = 245; // highest client address
68 // test Riviera as server
69  const QString gDOMAIN_TRIPLE = QString("192.168.0"); // for TUB multiclient hub
70  const int gMIN_TUB = 11; // lowest client address
71  const int gMAX_TUB = 20; // highest client address
72 
73 #ifdef WAIR // wair
74 // uses hub mode
75 // hard wire the number of netrev (comb filter) channels
76  #define NUMNETREVCHANSbecauseNOTINRECEIVEDheader 16 // for jacktripworker, jmess
77  const int gDefaultNumNetRevChannels = NUMNETREVCHANSbecauseNOTINRECEIVEDheader;
78  const int gDefaultAddCombFilterLength = 0;
79  const int gDefaultCombFilterFeedback = 0;
80 #endif // endwhere
81 
82 //const JackAudioInterface::audioBitResolutionT gDefaultBitResolutionMode =
83 // JackAudioInterface::BIT16;
86 const int gDefaultQueueLength = 4;
91 const QString gDefaultLocalAddress = QString();
92 const int gDefaultRedundancy = 1;
93 const int gTimeOutMultiThreadedServer = 10000; // seconds
94 const int gWaitCounter = 60;
96 
97 
98 //*******************************************************************************
100 
101 const int gDefaultPort = 4464;
102 const int gBindPortLow = 3464;
103 const int gBindPortHigh = 5464;
104 //const int gInputPort_0 = 4464; ///< Input base port
105 //const int gOutputPort_0 = 4465; ///< Output base port
106 //const int gDefaultSendPort = 4464; ///< Default for to use to send packet
108 
109 
110 //*******************************************************************************
112 
113 const char* const gPrintSeparator = "---------------------------------------------------------";
115 
116 
117 //*******************************************************************************
119 
120 extern int gVerboseFlag;
122 
123 
124 //*******************************************************************************
126 
127 const int gJackBitResolution = 32;
128 const QString gJackDefaultClientName = "JackTrip";
129 const int gMaxRemoteNameLength = 64;
131 
132 
133 //*******************************************************************************
135 
137 
138 
139 //*******************************************************************************
141 
142 const int gMaxThreads = 1024;
144 
146 const int gServerUdpPort = 4464;
148 
149 
150 #endif
audioBitResolutionT
Enum for Audio Resolution in bits.
Definition: AudioInterface.h:62
@ BIT16
16 bits (default)
Definition: AudioInterface.h:64
const uint32_t gDefaultBufferSizeInSamples
Definition: jacktrip_globals.h:90
int gVerboseFlag
Verbose mode flag declaration.
Definition: Settings.cpp:61
const int gDefaultRedundancy
Definition: jacktrip_globals.h:92
const int gMAX_TUB
Definition: jacktrip_globals.h:71
const uint32_t gDefaultSampleRate
Definition: jacktrip_globals.h:88
const int gBindPortHigh
highest Bindport
Definition: jacktrip_globals.h:103
const char *const gVersion
JackTrip version.
Definition: jacktrip_globals.h:47
const int gJackBitResolution
Audio Bit Resolution of the Jack Server.
Definition: jacktrip_globals.h:127
const int gTimeOutMultiThreadedServer
Definition: jacktrip_globals.h:93
const int gDefaultNumInChannels
Definition: jacktrip_globals.h:52
const int gBindPortLow
lowest Bindport
Definition: jacktrip_globals.h:102
const int gDefaultPort
Default JackTrip Port.
Definition: jacktrip_globals.h:101
const uint32_t gDefaultDeviceID
Definition: jacktrip_globals.h:89
const int gMaxThreads
Maximum Threads that can be run at the same time.
Definition: jacktrip_globals.h:143
const QString WAIR_AUDIO_NAME
Definition: jacktrip_globals.h:57
const QString gDefaultLocalAddress
Definition: jacktrip_globals.h:91
const QString gJackDefaultClientName
Definition: jacktrip_globals.h:128
const QString gDOMAIN_TRIPLE
Definition: jacktrip_globals.h:69
const char *const gPrintSeparator
Definition: jacktrip_globals.h:113
const int gMaxRemoteNameLength
Definition: jacktrip_globals.h:129
const int gWaitCounter
Definition: jacktrip_globals.h:94
const int gDefaultNumOutChannels
Definition: jacktrip_globals.h:53
const int gMAX_WAIRS
Definition: jacktrip_globals.h:58
const int gMIN_TUB
Definition: jacktrip_globals.h:70
const int gDefaultQueueLength
Definition: jacktrip_globals.h:86
const int gServerUdpPort
Public well-known UDP port to where the clients will connect.
Definition: jacktrip_globals.h:146
const int gDefaultOutputQueueLength
Definition: jacktrip_globals.h:87
void setRealtimeProcessPriority()
const AudioInterface::audioBitResolutionT gDefaultBitResolutionMode
Definition: jacktrip_globals.h:84
quint32 uint32_t
Typedef for unsigned int. This type is guaranteed to be 32-bit.
Definition: jacktrip_types.h:73