Table of Contents

Wwise SDK 2019.2.3
PlatformID.h
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Version: <VERSION> Build: <BUILDNUMBER>
25  Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc.
26 *******************************************************************************/
27 
28 /// \file
29 /// Unique identifiers for platforms in the Wwise authoring application.
30 
31 #ifndef AK_WWISE_PLATFORMID_H
32 #define AK_WWISE_PLATFORMID_H
33 
34 #if defined( _MSC_VER )
35  #define AK_ID_DECLARE extern const _declspec( selectany )
36 #else
37  #define AK_ID_DECLARE extern const __attribute__( ( weak ) )
38 #endif
39 
41 {
42  BasePlatformID():guid( GUID_NULL ){}
43 
44  // The Create function is a functionnal replacement for the BasePlatformID() constructor taking a GUID in parameters.
45  // This is to avoid situations where someone would pass a GUID instead of a BasePlatformID in a function call while migrating, which would
46  // compile but would lead the user into serious errors.
47  static BasePlatformID Create( const GUID& in_BasePlatformID )
48  {
49  BasePlatformID ret;
50  ret.guid = in_BasePlatformID;
51  return ret;
52  }
53 
55  {
56  return BasePlatformID::Create(GUID_NULL);
57  }
58 
59  bool IsNull() const
60  {
61  return (guid == GUID_NULL) ? true : false;
62  }
63 
64  bool operator == ( const BasePlatformID& in_rOther ) const
65  {
66  return (in_rOther.guid == guid)? true : false;
67  }
68  bool operator != ( const BasePlatformID& in_rOther ) const
69  {
70  return (in_rOther.guid != guid)? true : false;
71  }
72  GUID guid;
73 
75  {
76  bool operator()( const BasePlatformID& in_rLeft, const BasePlatformID& in_rRight ) const
77  {
78  return ( ::memcmp( &in_rLeft, &in_rRight, sizeof(BasePlatformID) ) < 0 );
79  }
80  };
81 };
82 
83 namespace PlatformID
84 {
85  // {6E0CB257-C6C8-4c5c-8366-2740DFC441EB}
86  AK_ID_DECLARE GUID Windows_unsafeguid = { 0x6E0CB257, 0xC6C8, 0x4c5c, { 0x83, 0x66, 0x27, 0x40, 0xDF, 0xC4, 0x41, 0xEB } };
88 
89  // {E0C09284-6F61-43dc-9C9D-D8047E47AB3B}
90  AK_ID_DECLARE GUID Xbox360_unsafeguid = { 0xE0C09284, 0x6F61, 0x43dc, { 0x9C, 0x9D, 0xD8, 0x04, 0x7E, 0x47, 0xAB, 0x3B } };
92 
93  // {D85DACB3-8FDB-4aba-8C8A-1F46AFB35366}
94  AK_ID_DECLARE GUID PS3_unsafeguid = { 0xD85DACB3, 0x8FDB, 0x4aba, { 0x8C, 0x8A, 0x1F, 0x46, 0xAF, 0xB3, 0x53, 0x66 } };
96 
97  // {9C6217D5-DD11-4795-87C1-6CE02853C540}
98  AK_ID_DECLARE GUID Mac_unsafeguid = { 0x9c6217d5, 0xdd11, 0x4795, { 0x87, 0xc1, 0x6c, 0xe0, 0x28, 0x53, 0xc5, 0x40 } };
100 
101  // {2DB55050-4B70-4243-A22C-434D776A0753}
102  AK_ID_DECLARE GUID VitaSW_unsafeguid = { 0x2db55050, 0x4b70, 0x4243, { 0xa2, 0x2c, 0x43, 0x4d, 0x77, 0x6a, 0x7, 0x53 } };
104 
105  // {091EBCFF-5E04-4260-B025-566206272EA6}
106  AK_ID_DECLARE GUID VitaHW_unsafeguid = { 0x91ebcff, 0x5e04, 0x4260, { 0xb0, 0x25, 0x56, 0x62, 0x6, 0x27, 0x2e, 0xa6 } };
108 
109  // {3AF9B9B6-6EF1-47E9-B5FE-E30C9E602C77}
110  AK_ID_DECLARE GUID PS4_unsafeguid = { 0x3af9b9b6, 0x6ef1, 0x47e9, { 0xb5, 0xfe, 0xe3, 0xc, 0x9e, 0x60, 0x2c, 0x77 } };
112 
113  // {662A5E67-9D35-48DA-B6A8-B77C7F1D84E0}
114  AK_ID_DECLARE GUID Pellegrino_unsafeguid = { 0x662a5e67, 0x9d35, 0x48da, { 0xb6, 0xa8, 0xb7, 0x7c, 0x7f, 0x1d, 0x84, 0xe0 } };
116 
117  // {ECE03DB4-F948-462d-B2BB-A9173012B1F8}
118  AK_ID_DECLARE GUID iOS_unsafeguid = { 0xece03db4, 0xf948, 0x462d, { 0xb2, 0xbb, 0xa9, 0x17, 0x30, 0x12, 0xb1, 0xf8 } };
120 
121  // {7CB75869-58AD-4458-948A-1935CCB4AC66}
122  AK_ID_DECLARE GUID WiiUSW_unsafeguid = { 0x7cb75869, 0x58ad, 0x4458, { 0x94, 0x8a, 0x19, 0x35, 0xcc, 0xb4, 0xac, 0x66 } };
124 
125  // {FF757AE1-FCE5-420d-9E8A-32139D436F74}
126  AK_ID_DECLARE GUID WiiUHW_unsafeguid = { 0xff757ae1, 0xfce5, 0x420d, { 0x9e, 0x8a, 0x32, 0x13, 0x9d, 0x43, 0x6f, 0x74 } };
128 
129  // {a2d401de-b8b6-4feb-8142-137c34d507CA}
130  AK_ID_DECLARE GUID Android_unsafeguid = { 0xa2d401de, 0xb8b6, 0x4feb, { 0x81, 0x42, 0x13, 0x7c, 0x34, 0xd5, 0x07, 0xCA } };
132 
133  // {B131584B-9961-4bb5-9C58-A3E9ABFFBBF6}
134  AK_ID_DECLARE GUID XboxOne_unsafeguid = { 0xb131584b, 0x9961, 0x4bb5, { 0x9c, 0x58, 0xa3, 0xe9, 0xab, 0xff, 0xbb, 0xf6 } };
136 
137  // {BD0BDF13-3125-454f-8BFD-319537169F81}
138  AK_ID_DECLARE GUID Linux_unsafeguid = { 0xbd0bdf13, 0x3125, 0x454f, { 0x8b, 0xfd, 0x31, 0x95, 0x37, 0x16, 0x9f, 0x81 } };
140 
141  // {EBDCC377-12EE-4FFE-A545-8588F83CAC94}
142  AK_ID_DECLARE GUID Stadia_unsafeguid = { 0xebdcc377, 0x12ee, 0x4ffe, { 0xa5, 0x45, 0x85, 0x88, 0xf8, 0x3c, 0xac, 0x94 } };
144 
145  // {874F26D2-416D-4698-BFB6-3427CAFCFF9C}
146  AK_ID_DECLARE GUID NintendoNX_unsafeguid = { 0x874f26d2, 0x416d, 0x4698, { 0xbf, 0xb6, 0x34, 0x27, 0xca, 0xfc, 0xff, 0x9c } };
148 
149  // {2EBB8232-E286-4962-A676-D15590AB9647}
150  AK_ID_DECLARE GUID Lumin_unsafeguid = { 0x2ebb8232, 0xe286, 0x4962, { 0xa6, 0x76, 0xd1, 0x55, 0x90, 0xab, 0x96, 0x47 } };
152 
153  // {639AD233-23F2-4c0f-9127-79F44C15E1DA}
154  AK_ID_DECLARE GUID Emscripten_unsafeguid = { 0x639ad233, 0x23f2, 0x4c0f, { 0x91, 0x27, 0x79, 0xf4, 0x4c, 0x15, 0xe1, 0xdA } };
156 
157  //{26352fc0-7716-4f97-8daf-3665ec2bb501}
158  AK_ID_DECLARE GUID Chinook_unsafeguid = { 0x26352fc0, 0x7716, 0x4f97, { 0x8d, 0xaf, 0x36, 0x65, 0xec, 0x2b, 0xb5, 0x01 } };
160 
161  /// Returns true if the given platform has Big Endian byte ordering.
162  inline bool IsPlatformBigEndian( const BasePlatformID & in_guidPlatform )
163  {
164  return in_guidPlatform == PlatformID::WiiUSW
165  || in_guidPlatform == PlatformID::WiiUHW
166  || in_guidPlatform == PlatformID::PS3
167  || in_guidPlatform == PlatformID::Xbox360;
168  }
169 
170  //This helper is used for platforms that are most probably on a ARM CPU (Android being possible on x86).
171  //This is currently used to switch between Vorbis encoding algorithms, for optimisation purposes.
172  inline bool PlatformMaybeARM(const BasePlatformID & in_guidPlatform)
173  {
174  return in_guidPlatform == PlatformID::NintendoNX
175  || in_guidPlatform == PlatformID::Android
176  || in_guidPlatform == PlatformID::iOS;
177  }
178 }
179 
180 #endif // AK_WWISE_PLATFORMID_H
AK_ID_DECLARE BasePlatformID Linux
Definition: PlatformID.h:139
AK_ID_DECLARE BasePlatformID PS4
Definition: PlatformID.h:111
AK_ID_DECLARE GUID iOS_unsafeguid
Definition: PlatformID.h:118
AK_ID_DECLARE GUID Mac_unsafeguid
Definition: PlatformID.h:98
static BasePlatformID Empty()
Definition: PlatformID.h:54
bool IsPlatformBigEndian(const BasePlatformID &in_guidPlatform)
Returns true if the given platform has Big Endian byte ordering.
Definition: PlatformID.h:162
bool operator!=(const BasePlatformID &in_rOther) const
Definition: PlatformID.h:68
AK_ID_DECLARE BasePlatformID PS3
Definition: PlatformID.h:95
AK_ID_DECLARE BasePlatformID VitaSW
Definition: PlatformID.h:103
AK_ID_DECLARE BasePlatformID Mac
Definition: PlatformID.h:99
AK_ID_DECLARE GUID Android_unsafeguid
Definition: PlatformID.h:130
AK_ID_DECLARE BasePlatformID VitaHW
Definition: PlatformID.h:107
AK_ID_DECLARE GUID PS3_unsafeguid
Definition: PlatformID.h:94
AK_ID_DECLARE BasePlatformID XboxOne
Definition: PlatformID.h:135
AK_ID_DECLARE BasePlatformID Xbox360
Definition: PlatformID.h:91
AK_ID_DECLARE BasePlatformID Emscripten
Definition: PlatformID.h:155
AK_ID_DECLARE GUID Xbox360_unsafeguid
Definition: PlatformID.h:90
AK_ID_DECLARE GUID Chinook_unsafeguid
Definition: PlatformID.h:158
AK_ID_DECLARE BasePlatformID NintendoNX
Definition: PlatformID.h:147
bool operator==(const BasePlatformID &in_rOther) const
Definition: PlatformID.h:64
AK_ID_DECLARE GUID NintendoNX_unsafeguid
Definition: PlatformID.h:146
AK_ID_DECLARE BasePlatformID Windows
Definition: PlatformID.h:87
AK_ID_DECLARE BasePlatformID WiiUSW
Definition: PlatformID.h:123
AK_ID_DECLARE GUID WiiUSW_unsafeguid
Definition: PlatformID.h:122
AK_ID_DECLARE GUID Linux_unsafeguid
Definition: PlatformID.h:138
AK_ID_DECLARE BasePlatformID Chinook
Definition: PlatformID.h:159
AK_ID_DECLARE GUID PS4_unsafeguid
Definition: PlatformID.h:110
AK_ID_DECLARE GUID Emscripten_unsafeguid
Definition: PlatformID.h:154
AK_ID_DECLARE BasePlatformID Android
Definition: PlatformID.h:131
AK_ID_DECLARE GUID WiiUHW_unsafeguid
Definition: PlatformID.h:126
AK_ID_DECLARE BasePlatformID Lumin
Definition: PlatformID.h:151
AK_ID_DECLARE BasePlatformID WiiUHW
Definition: PlatformID.h:127
AK_ID_DECLARE GUID VitaSW_unsafeguid
Definition: PlatformID.h:102
static BasePlatformID Create(const GUID &in_BasePlatformID)
Definition: PlatformID.h:47
AK_ID_DECLARE BasePlatformID Pellegrino
Definition: PlatformID.h:115
AK_ID_DECLARE BasePlatformID Stadia
Definition: PlatformID.h:143
GUID guid
Definition: PlatformID.h:72
AK_ID_DECLARE GUID Stadia_unsafeguid
Definition: PlatformID.h:142
bool IsNull() const
Definition: PlatformID.h:59
AK_ID_DECLARE GUID Pellegrino_unsafeguid
Definition: PlatformID.h:114
AK_ID_DECLARE GUID VitaHW_unsafeguid
Definition: PlatformID.h:106
AK_ID_DECLARE GUID Windows_unsafeguid
Definition: PlatformID.h:86
bool PlatformMaybeARM(const BasePlatformID &in_guidPlatform)
Definition: PlatformID.h:172
BasePlatformID()
Definition: PlatformID.h:42
AK_ID_DECLARE BasePlatformID iOS
Definition: PlatformID.h:119
AK_ID_DECLARE GUID XboxOne_unsafeguid
Definition: PlatformID.h:134
bool operator()(const BasePlatformID &in_rLeft, const BasePlatformID &in_rRight) const
Definition: PlatformID.h:76
AK_ID_DECLARE GUID Lumin_unsafeguid
Definition: PlatformID.h:150