00001 //***************************************************************** 00002 /* 00003 JackTrip: A System for High-Quality Audio Network Performance 00004 over the Internet 00005 00006 Copyright (c) 2008 Juan-Pablo Caceres, Chris Chafe. 00007 SoundWIRE group at CCRMA, Stanford University. 00008 00009 Permission is hereby granted, free of charge, to any person 00010 obtaining a copy of this software and associated documentation 00011 files (the "Software"), to deal in the Software without 00012 restriction, including without limitation the rights to use, 00013 copy, modify, merge, publish, distribute, sublicense, and/or sell 00014 copies of the Software, and to permit persons to whom the 00015 Software is furnished to do so, subject to the following 00016 conditions: 00017 00018 The above copyright notice and this permission notice shall be 00019 included in all copies or substantial portions of the Software. 00020 00021 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00022 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 00023 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00024 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 00025 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 00026 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00027 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00028 OTHER DEALINGS IN THE SOFTWARE. 00029 */ 00030 //***************************************************************** 00031 00038 #ifndef __JACKTRIP_GLOBALS_H__ 00039 #define __JACKTRIP_GLOBALS_H__ 00040 00041 #include "JackAudioInterface.h" 00042 00043 00044 //namespace JackTrip/// \todo Add this namespace 00045 00046 const char* const gVersion = "1.0.5"; 00047 00048 //******************************************************************************* 00050 00051 const int gDefaultNumInChannels = 2; 00052 const int gDefaultNumOutChannels = 2; 00053 const JackAudioInterface::audioBitResolutionT gDefaultBitResolutionMode = 00054 JackAudioInterface::BIT16; 00055 const int gDefaultQueueLength = 4; 00056 const int gDefaultOutputQueueLength = 4; 00058 00059 00060 //******************************************************************************* 00062 00063 const int gDefaultPort = 4464; 00064 //const int gInputPort_0 = 4464; ///< Input base port 00065 //const int gOutputPort_0 = 4465; ///< Output base port 00066 //const int gDefaultSendPort = 4464; ///< Default for to use to send packet 00068 00069 00070 //******************************************************************************* 00072 00073 const char* const gPrintSeparator = "---------------------------------------------------------"; 00075 00076 00077 //******************************************************************************* 00079 00080 extern int gVerboseFlag; 00081 00082 00083 00084 //******************************************************************************* 00086 00087 const int gJackBitResolution = 32; 00088 00089 00090 00091 //******************************************************************************* 00093 00094 void set_crossplatform_realtime_priority(); 00095 00097 // Linux Specific Functions 00098 #if defined ( __LINUX__ ) 00099 00100 int get_fifo_priority (bool half); 00102 int set_fifo_priority (bool half); 00103 int set_realtime_priority (void); 00104 #endif //__LINUX__ 00105 00106 00108 // Mac OS X Specific Functions 00109 #if defined ( __MAC_OSX__ ) 00110 int set_realtime(int period, int computation, int constraint); 00111 #endif //__MAC_OSX__ 00112 00113 00114 00115 //******************************************************************************* 00117 00118 00119 const int gMaxThreads = 290; // some pthread limit around 297? 00120 00122 const int gServerUdpPort = 4464; 00124 00125 00126 #endif