globals.h 3.27 KB
Newer Older
jcaceres's avatar
jcaceres committed
1
2
//*****************************************************************
/*
jcaceres's avatar
jcaceres committed
3
  JackTrip: A System for High-Quality Audio Network Performance
jcaceres's avatar
jcaceres committed
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  over the Internet

  Copyright (c) 2008 Juan-Pablo Caceres, Chris Chafe.
  SoundWIRE group at CCRMA, Stanford University.
  
  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation
  files (the "Software"), to deal in the Software without
  restriction, including without limitation the rights to use,
  copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the
  Software is furnished to do so, subject to the following
  conditions:
  
  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  OTHER DEALINGS IN THE SOFTWARE.
*/
//*****************************************************************

/**
jcaceres's avatar
jcaceres committed
33
 * \file globals.cpp
jcaceres's avatar
jcaceres committed
34
35
36
37
 * \author Juan-Pablo Caceres
 * \date June 2008
 */

jcaceres's avatar
jcaceres committed
38
39
#ifndef __JACKTRIP_GLOBALS_H__
#define __JACKTRIP_GLOBALS_H__
jcaceres's avatar
jcaceres committed
40

jcaceres's avatar
jcaceres committed
41
42
#include "JackAudioInterface.h"

43
44

//*******************************************************************************
jcaceres's avatar
jcaceres committed
45
46
47
48
/// \name Default Values
//@{
const int gDefaultNumInChannels = 2;
const int gDefaultNumOutChannels = 2;
jcaceres's avatar
jcaceres committed
49
50
51
const JackAudioInterface::audioBitResolutionT gDefaultBitResolutionMode = 
  JackAudioInterface::BIT16;
const int gDefaultQueueLength = 4;
jcaceres's avatar
jcaceres committed
52
const int gDefaultOutputQueueLength = 4;
jcaceres's avatar
jcaceres committed
53
//@}
jcaceres's avatar
jcaceres committed
54

jcaceres's avatar
jcaceres committed
55

56
//*******************************************************************************
jcaceres's avatar
jcaceres committed
57
58
/// \name Network related ports
//@{
jcaceres's avatar
jcaceres committed
59
60
const int gInputPort_0 = 4464; ///< Input base port
const int gOutputPort_0 = 4465; ///< Output base port
jcaceres's avatar
jcaceres committed
61
62
//@}

jcaceres's avatar
jcaceres committed
63

64
//*******************************************************************************
jcaceres's avatar
jcaceres committed
65
66
/// \name Separator for terminal printing
//@{
jcaceres's avatar
jcaceres committed
67
const char* const gPrintSeparator = "---------------------------------------------------------";
jcaceres's avatar
jcaceres committed
68
69
//@}

jcaceres's avatar
jcaceres committed
70

71
//*******************************************************************************
jcaceres's avatar
jcaceres committed
72
73
/// \name Global flags
//@{
74
extern int gVerboseFlag; ///< Verbose mode flag declaration
jcaceres's avatar
jcaceres committed
75
76
//@}

77

78
//*******************************************************************************
jcaceres's avatar
jcaceres committed
79
80
81
82
/// \name JackAudio
//@{
const int gJackBitResolution = 32; ///< Audio Bit Resolution of the Jack Server
//@}
jcaceres's avatar
jcaceres committed
83

84
85
86

//*******************************************************************************
/// \name Global Functions
87

88
89
90
91
92
93
94
95
//@{
// Linux Specific Functions
#if defined ( __LINUX__ )
/// \brief Returns fifo priority
int get_fifo_priority (bool half);
/// \brief Set fifo priority (if user has sufficient privileges).
int set_fifo_priority (bool half);
int set_realtime_priority (void);
96
#endif //__LINUX__
97
98
//@}

99
100
101
102
103
104
105
//@{
// Mac OS X Specific Functions
#if defined ( __MAC_OSX__ )
int set_realtime(int period, int computation, int constraint);
#endif //__MAC_OSX__ 
//@}
  
jcaceres's avatar
jcaceres committed
106
#endif