| AAX SDK 2.8.0 Avid Audio Extensions Development Kit

- Welcome
- Manual
- Classes
- Files
- Lists
- Support

- File List
- File Members

Loading...
Searching...
No Matches
AAX_EnvironmentUtilities.h
Go to the documentation of this file.
1/*================================================================================================*/
2/*
3
4 AAX_EnvironmentUtilities.h
5
6 Copyright 2018-2019, 2023-2024 Avid Technology, Inc.
7 All rights reserved.
8
9 This file is part of the Avid AAX SDK.
10
11 The AAX SDK is subject to commercial or open-source licensing.
12
13 By using the AAX SDK, you agree to the terms of both the Avid AAX SDK License
14 Agreement and Avid Privacy Policy.
15
16 AAX SDK License: https://developer.avid.com/aax
17 Privacy Policy: https://www.avid.com/legal/privacy-policy-statement
18
19 Or: You may also use this code under the terms of the GPL v3 (see
20 www.gnu.org/licenses).
21
22 THE AAX SDK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
23 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
24 DISCLAIMED.
25*/
26
33/*================================================================================================*/
34
35#ifndef _AAX_ENVIRONMENTUTILITIES_H_
36#define _AAX_ENVIRONMENTUTILITIES_H_
37
38#include <cstdlib>
39
40#if (!defined (WINDOWS_VERSION))
41# if (defined (_WIN32))
42# define WINDOWS_VERSION 1
43# endif
44#elif (defined (MAC_VERSION) || defined (LINUX_VERSION))
45# error "AAX SDK: Cannot declare more than one OS environment"
46#endif
47
48#if (!defined (MAC_VERSION))
49# if (defined (__APPLE__) && defined (__MACH__))
50# include "TargetConditionals.h"
51# if (TARGET_OS_MAC)
52# define MAC_VERSION 1
53# endif
54# endif
55#elif (defined (WINDOWS_VERSION) || defined (LINUX_VERSION))
56# error "AAX SDK: Cannot declare more than one OS environment"
57#endif
58
59#if (!defined (LINUX_VERSION))
60# if (defined (__linux__))
61# define LINUX_VERSION 1
62# endif
63#elif (defined (WINDOWS_VERSION) || defined (MAC_VERSION))
64# error "AAX SDK: Cannot declare more than one OS environment"
65#endif
66
67#if (!defined (WINDOWS_VERSION) && !defined (MAC_VERSION) && !defined (LINUX_VERSION))
68# warning "AAX SDK: Unknown OS environment"
69#endif
70
71 namespace AAX
72{
73 static bool IsVenueSystem(void)
74 {
75#if WINDOWS_VERSION
76 static const char * const environmentVariableName = "JEX_HOST_TYPE";
77 static const char * const venueEnvironment = "venue";
78 static const char * const environment = std::getenv ( environmentVariableName );
79 static const bool isVenue = ( NULL != environment) && (0 == strcmp ( environment, venueEnvironment ) );
80 return isVenue;
81#else
82 return false;
83#endif
84 }
85}
86
87#endif // _AAX_ENVIRONMENTUTILITIES_H_
AAX
Definition: AAX_EnvironmentUtilities.h:72