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.2beta2";
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 = 10; // jmess revision needed for string parse if > 1 digit
59 
60 // hubpatch = 3 for TUB ensemble patching
62 // test NUC as server
63 //const QString gDOMAIN_TRIPLE = QString("130.149.23"); // for TUB multiclient hub
64 //const int gMIN_TUB = 245; // lowest client address
65 //const int gMAX_TUB = 245; // highest client address
67 // test Riviera as server
68  const QString gDOMAIN_TRIPLE = QString("192.168.0"); // for TUB multiclient hub
69  const int gMIN_TUB = 11; // lowest client address
70  const int gMAX_TUB = 20; // highest client address
71 
72 #ifdef WAIR // wair
73 // uses hub mode
74 // hard wire the number of netrev (comb filter) channels
75  #define NUMNETREVCHANSbecauseNOTINRECEIVEDheader 16 // for jacktripworker, jmess
76  const int gDefaultNumNetRevChannels = NUMNETREVCHANSbecauseNOTINRECEIVEDheader;
77  const int gDefaultAddCombFilterLength = 0;
78  const int gDefaultCombFilterFeedback = 0;
79 #endif // endwhere
80 
81 //const JackAudioInterface::audioBitResolutionT gDefaultBitResolutionMode =
82 // JackAudioInterface::BIT16;
85 const int gDefaultQueueLength = 4;
90 const QString gDefaultLocalAddress = QString();
91 const int gDefaultRedundancy = 1;
92 const int gTimeOutMultiThreadedServer = 5000; // seconds
93 const int gWaitCounter = 60;
95 
96 
97 //*******************************************************************************
99 
100 const int gDefaultPort = 4464;
101 //const int gInputPort_0 = 4464; ///< Input base port
102 //const int gOutputPort_0 = 4465; ///< Output base port
103 //const int gDefaultSendPort = 4464; ///< Default for to use to send packet
105 
106 
107 //*******************************************************************************
109 
110 const char* const gPrintSeparator = "---------------------------------------------------------";
112 
113 
114 //*******************************************************************************
116 
117 extern int gVerboseFlag;
118 
119 
120 
121 //*******************************************************************************
123 
124 const int gJackBitResolution = 32;
125 
126 
127 
128 //*******************************************************************************
130 
132 
133 
134 //*******************************************************************************
136 
137 const int gMaxThreads = 290; // some pthread limit around 297?
139 
141 const int gServerUdpPort = 4464;
143 
144 
145 #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:91
gDefaultBitResolutionMode
const AudioInterface::audioBitResolutionT gDefaultBitResolutionMode
Definition: jacktrip_globals.h:83
gDefaultPort
const int gDefaultPort
Default JackTrip Port.
Definition: jacktrip_globals.h:100
gWaitCounter
const int gWaitCounter
Definition: jacktrip_globals.h:93
WAIR_AUDIO_NAME
const QString WAIR_AUDIO_NAME
Definition: jacktrip_globals.h:57
gMAX_TUB
const int gMAX_TUB
Definition: jacktrip_globals.h:70
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:141
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:138
AudioInterface::BIT16
@ BIT16
16 bits (default)
Definition: AudioInterface.h:63
gDefaultSampleRate
const uint32_t gDefaultSampleRate
Definition: jacktrip_globals.h:87
gDOMAIN_TRIPLE
const QString gDOMAIN_TRIPLE
Definition: jacktrip_globals.h:68
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:124
gDefaultBufferSizeInSamples
const uint32_t gDefaultBufferSizeInSamples
Definition: jacktrip_globals.h:89
gDefaultOutputQueueLength
const int gDefaultOutputQueueLength
Definition: jacktrip_globals.h:86
gTimeOutMultiThreadedServer
const int gTimeOutMultiThreadedServer
Definition: jacktrip_globals.h:92
gPrintSeparator
const char *const gPrintSeparator
Definition: jacktrip_globals.h:110
gMIN_TUB
const int gMIN_TUB
Definition: jacktrip_globals.h:69
gDefaultDeviceID
const uint32_t gDefaultDeviceID
Definition: jacktrip_globals.h:88
gDefaultLocalAddress
const QString gDefaultLocalAddress
Definition: jacktrip_globals.h:90
gDefaultQueueLength
const int gDefaultQueueLength
Definition: jacktrip_globals.h:85
setRealtimeProcessPriority
void setRealtimeProcessPriority()