JackTrip: src/jacktrip_globals.h Source File

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;
56 const AudioInterface::audioBitResolutionT gDefaultBitResolutionMode =
57 AudioInterface::BIT16;
58 const int gDefaultQueueLength = 4;
59 const int gDefaultOutputQueueLength = 4;
60 const uint32_t gDefaultSampleRate = 48000;
61 const uint32_t gDefaultBufferSizeInSamples = 128;
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
103 void set_crossplatform_realtime_priority();
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
gVersion
const char *const gVersion
JackTrip version.
Definition: jacktrip_globals.h:47
AudioInterface::audioBitResolutionT
audioBitResolutionT
Enum for Audio Resolution in bits.
Definition: AudioInterface.h:61
gDefaultSampleRate
const uint32_t gDefaultSampleRate
Definition: jacktrip_globals.h:60
gDefaultNumInChannels
const int gDefaultNumInChannels
Definition: jacktrip_globals.h:52
uint32_t
quint32 uint32_t
Typedef for unsigned int. This type is guaranteed to be 32-bit.
Definition: jacktrip_types.h:73
AudioInterface.h
gDefaultBufferSizeInSamples
const uint32_t gDefaultBufferSizeInSamples
Definition: jacktrip_globals.h:61
AudioInterface::BIT16
16 bits (default)
Definition: AudioInterface.h:63
gDefaultBitResolutionMode
const AudioInterface::audioBitResolutionT gDefaultBitResolutionMode
Definition: jacktrip_globals.h:56
gVerboseFlag
int gVerboseFlag
Verbose mode flag declaration.
Definition: Settings.cpp:53
gDefaultPort
const int gDefaultPort
Default JackTrip Port.
Definition: jacktrip_globals.h:72
gPrintSeparator
const char *const gPrintSeparator
Definition: jacktrip_globals.h:82
gDefaultOutputQueueLength
const int gDefaultOutputQueueLength
Definition: jacktrip_globals.h:59
gDefaultLocalAddress
const QString gDefaultLocalAddress
Definition: jacktrip_globals.h:62
gMaxThreads
const int gMaxThreads
Maximum Threads that can be run at the same time.
Definition: jacktrip_globals.h:134
gDefaultQueueLength
const int gDefaultQueueLength
Definition: jacktrip_globals.h:58
gTimeOutMultiThreadedServer
const int gTimeOutMultiThreadedServer
Definition: jacktrip_globals.h:64
gJackBitResolution
const int gJackBitResolution
Audio Bit Resolution of the Jack Server.
Definition: jacktrip_globals.h:96
gDefaultRedundancy
const int gDefaultRedundancy
Definition: jacktrip_globals.h:63
gServerUdpPort
const int gServerUdpPort
Public well-known UDP port to where the clients will connect.
Definition: jacktrip_globals.h:137
set_crossplatform_realtime_priority
void set_crossplatform_realtime_priority()
Definition: jacktrip_globals.cpp:209
gDefaultNumOutChannels
const int gDefaultNumOutChannels
Definition: jacktrip_globals.h:53
gWaitCounter
const int gWaitCounter
Definition: jacktrip_globals.h:65