Version
Wwise SDK 2021.1.8
PluginHelpers.h
Go to the documentation of this file.
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: v2021.1.8 Build: 7831
25  Copyright (c) 2006-2022 Audiokinetic Inc.
26 *******************************************************************************/
27 
28 /**
29  * \brief Wwise Authoring Plug-ins - Helper tools, potentially defined elsewhere.
30  * \file AK/Wwise/Plugin/PluginHelpers.h
31  */
32 
33 #pragma once
34 
35 #include "../../AkPlatforms.h"
36 #include "../../AkWwiseSDKVersion.h"
37 
38 #include <memory.h>
39 #include <stdbool.h> // for bool type
40 #include <stdint.h> // for integer types (uint32_t, ...)
41 
42 // These definitions are used throughout the Wwise plug-in system
43 #ifndef GUID_DEFINED // Adapted from Windows API, to have exactly the same definition. C-compatible.
44 #define GUID_DEFINED
45 #pragma pack(push,8)
46 typedef struct _GUID {
47  uint32_t Data1;
48  uint16_t Data2;
49  uint16_t Data3;
50  uint8_t Data4[8];
51 } GUID;
52 #pragma pack(pop)
53 #endif
54 
55 #ifndef AK_WIN
56 #ifndef GUID_HELPERS_DEFINED
57 #define GUID_HELPERS_DEFINED
58 extern const __attribute__((weak)) GUID GUID_NULL = { 0 };
59 
60 inline bool operator==(const GUID& lhs, const GUID& rhs)
61 {
62  return memcmp(&lhs, &rhs, sizeof(GUID)) == 0;
63 }
64 
65 inline bool operator!=(const GUID& lhs, const GUID& rhs)
66 {
67  return !(lhs == rhs);
68 }
69 #endif
70 #else
71 #define AK_DEFINE_GUID_NULL
72 #endif
73 
74 #ifndef MKBOOL
75 #define MKBOOL(cond) ((cond) ? true : false)
76 #endif
uint32_t Data1
Definition: PluginHelpers.h:47
uint16_t Data2
Definition: PluginHelpers.h:48
uint16_t Data3
Definition: PluginHelpers.h:49
Definition: PluginHelpers.h:46