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.2.1";
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 gInputPort_0 = 4464; ///< Input base port
103 //const int gOutputPort_0 = 4465; ///< Output base port
104 //const int gDefaultSendPort = 4464; ///< Default for to use to send packet
106 
107 
108 //*******************************************************************************
110 
111 const char* const gPrintSeparator = "---------------------------------------------------------";
113 
114 
115 //*******************************************************************************
117 
118 extern int gVerboseFlag;
119 
120 
121 
122 //*******************************************************************************
124 
125 const int gJackBitResolution = 32;
126 const char* const gJackDefaultClientName = "JackTrip";
128 
129 
130 //*******************************************************************************
132 
134 
135 
136 //*******************************************************************************
138 
139 const int gMaxThreads = 1024;
141 
143 const int gServerUdpPort = 4464;
145 
146 
147 #endif
gVersion
const char *const gVersion
JackTrip version.
Definition: jacktrip_globals.h:47
gDefaultNumOutChannels
const int gDefaultNumOutChannels
Definition: jacktrip_globals.h:53
gDefaultRedundancy
const int gDefaultRedundancy
Definition: jacktrip_globals.h:92
gDefaultBitResolutionMode
const AudioInterface::audioBitResolutionT gDefaultBitResolutionMode
Definition: jacktrip_globals.h:84
gDefaultPort
const int gDefaultPort
Default JackTrip Port.
Definition: jacktrip_globals.h:101
gWaitCounter
const int gWaitCounter
Definition: jacktrip_globals.h:94
WAIR_AUDIO_NAME
const QString WAIR_AUDIO_NAME
Definition: jacktrip_globals.h:57
gMAX_TUB
const int gMAX_TUB
Definition: jacktrip_globals.h:71
gMAX_WAIRS
const int gMAX_WAIRS
Definition: jacktrip_globals.h:58
AudioInterface.h
AudioInterface::audioBitResolutionT
audioBitResolutionT
Enum for Audio Resolution in bits.
Definition: AudioInterface.h:61
gServerUdpPort
const int gServerUdpPort
Public well-known UDP port to where the clients will connect.
Definition: jacktrip_globals.h:143
uint32_t
quint32 uint32_t
Typedef for unsigned int. This type is guaranteed to be 32-bit.
Definition: jacktrip_types.h:73
gDefaultNumInChannels
const int gDefaultNumInChannels
Definition: jacktrip_globals.h:52
gMaxThreads
const int gMaxThreads
Maximum Threads that can be run at the same time.
Definition: jacktrip_globals.h:140
AudioInterface::BIT16
@ BIT16
16 bits (default)
Definition: AudioInterface.h:63
gDefaultSampleRate
const uint32_t gDefaultSampleRate
Definition: jacktrip_globals.h:88
gDOMAIN_TRIPLE
const QString gDOMAIN_TRIPLE
Definition: jacktrip_globals.h:69
gVerboseFlag
int gVerboseFlag
Verbose mode flag declaration.
Definition: Settings.cpp:59
gJackBitResolution
const int gJackBitResolution
Audio Bit Resolution of the Jack Server.
Definition: jacktrip_globals.h:125
gDefaultBufferSizeInSamples
const uint32_t gDefaultBufferSizeInSamples
Definition: jacktrip_globals.h:90
gJackDefaultClientName
const char *const gJackDefaultClientName
Definition: jacktrip_globals.h:126
gDefaultOutputQueueLength
const int gDefaultOutputQueueLength
Definition: jacktrip_globals.h:87
gTimeOutMultiThreadedServer
const int gTimeOutMultiThreadedServer
Definition: jacktrip_globals.h:93
gPrintSeparator
const char *const gPrintSeparator
Definition: jacktrip_globals.h:111
gMIN_TUB
const int gMIN_TUB
Definition: jacktrip_globals.h:70
gDefaultDeviceID
const uint32_t gDefaultDeviceID
Definition: jacktrip_globals.h:89
gDefaultLocalAddress
const QString gDefaultLocalAddress
Definition: jacktrip_globals.h:91
gDefaultQueueLength
const int gDefaultQueueLength
Definition: jacktrip_globals.h:86
setRealtimeProcessPriority
void setRealtimeProcessPriority()