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.1";
48 
49 //*******************************************************************************
51 
52 const int gDefaultNumInChannels = 2;
53 const int gDefaultNumOutChannels = 2;
54 //const JackAudioInterface::audioBitResolutionT gDefaultBitResolutionMode =
55 // JackAudioInterface::BIT16;
58 const int gDefaultQueueLength = 4;
62 const QString gDefaultLocalAddress = QString();
63 const int gDefaultRedundancy = 1;
64 const int gTimeOutMultiThreadedServer = 5000; // seconds
65 const int gWaitCounter = 60;
67 
68 
69 //*******************************************************************************
71 
72 const int gDefaultPort = 4464;
73 //const int gInputPort_0 = 4464; ///< Input base port
74 //const int gOutputPort_0 = 4465; ///< Output base port
75 //const int gDefaultSendPort = 4464; ///< Default for to use to send packet
77 
78 
79 //*******************************************************************************
81 
82 const char* const gPrintSeparator = "---------------------------------------------------------";
84 
85 
86 //*******************************************************************************
88 
89 extern int gVerboseFlag;
90 
91 
92 
93 //*******************************************************************************
95 
96 const int gJackBitResolution = 32;
97 
98 
99 
100 //*******************************************************************************
102 
104 
106 // Linux Specific Functions
107 #if defined ( __LINUX__ )
108 int get_fifo_priority (bool half);
111 int set_fifo_priority (bool half);
112 int set_realtime_priority (void);
113 #endif //__LINUX__
114 
115 
117 // Mac OS X Specific Functions
118 #if defined ( __MAC_OSX__ )
119 int set_realtime(int period, int computation, int constraint);
120 #endif //__MAC_OSX__
121 
122 
124 // Windows Specific Functions
125 #if defined ( __WIN_32__ )
126 int win_priority();
127 #endif //__WIN_32__
128 
129 
130 //*******************************************************************************
132 
133 const int gMaxThreads = 290; // some pthread limit around 297?
135 
137 const int gServerUdpPort = 4464;
139 
140 
141 #endif
const char *const gVersion
JackTrip version.
Definition: jacktrip_globals.h:47
audioBitResolutionT
Enum for Audio Resolution in bits.
Definition: AudioInterface.h:61
const uint32_t gDefaultSampleRate
Definition: jacktrip_globals.h:60
const int gDefaultNumInChannels
Definition: jacktrip_globals.h:52
quint32 uint32_t
Typedef for unsigned int. This type is guaranteed to be 32-bit.
Definition: jacktrip_types.h:73
const uint32_t gDefaultBufferSizeInSamples
Definition: jacktrip_globals.h:61
16 bits (default)
Definition: AudioInterface.h:63
const AudioInterface::audioBitResolutionT gDefaultBitResolutionMode
Definition: jacktrip_globals.h:56
int gVerboseFlag
Verbose mode flag declaration.
Definition: Settings.cpp:53
const int gDefaultPort
Default JackTrip Port.
Definition: jacktrip_globals.h:72
const char *const gPrintSeparator
Definition: jacktrip_globals.h:82
const int gDefaultOutputQueueLength
Definition: jacktrip_globals.h:59
const QString gDefaultLocalAddress
Definition: jacktrip_globals.h:62
const int gMaxThreads
Maximum Threads that can be run at the same time.
Definition: jacktrip_globals.h:134
const int gDefaultQueueLength
Definition: jacktrip_globals.h:58
const int gTimeOutMultiThreadedServer
Definition: jacktrip_globals.h:64
const int gJackBitResolution
Audio Bit Resolution of the Jack Server.
Definition: jacktrip_globals.h:96
const int gDefaultRedundancy
Definition: jacktrip_globals.h:63
const int gServerUdpPort
Public well-known UDP port to where the clients will connect.
Definition: jacktrip_globals.h:137
void set_crossplatform_realtime_priority()
Definition: jacktrip_globals.cpp:209
const int gDefaultNumOutChannels
Definition: jacktrip_globals.h:53
const int gWaitCounter
Definition: jacktrip_globals.h:65