Version
menu_open
link
Wwise SDK 2022.1.11
AkTypes.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  Copyright (c) 2024 Audiokinetic Inc.
25 *******************************************************************************/
26 
27 // AkTypes.h
28 
29 /// \file
30 /// Data type definitions.
31 
32 #pragma once
33 
34 #ifdef __PROSPERO__
35 
37 
38 #include <kernel.h>
39 #include <sceconst.h>
40 #include <scetypes.h>
41 #include <sdk_version.h>
42 #include <stddef.h>
43 
44 #if !defined(AK_PS5)
45  #define AK_PS5 ///< Compiling for PS5
46 #endif
47 #if !defined(AK_SONY)
48  #define AK_SONY ///< Sony platform
49 #endif
50 
51 #define AK_SCE_AJM_SUPPORTED ///< Supports SCE AJM library
52 #define AK_ATRAC9_SUPPORTED ///< Supports ATRAC9 codec
53 #define AK_DVR_BYPASS_SUPPORTED ///< Supports feature which blocks DVRs from recording BGM
54 #define AK_HARDWARE_DECODING_SUPPORTED ///< Supports LEngine callbacks for hardware decoding
55 #define AK_WEM_OPUS_HW_SUPPORTED ///< Supports hardware decoding of WEM Opus codec
56 #define AK_VORBIS_HW_SUPPORTED ///< Supports hardware decoding of Vorbis codec
57 #define AK_DEVICE_MEMORY_SUPPORTED ///< Supports special memory allocations shared with the audio co-processor
58 #define AK_CUSTOM_INTERNAL_JOBS_SUPPORTED ///< Supports extra, internal, job queues for jobmgr
59 #define AK_HARDWARE_FILTER_MIX_SUPPORTED ///< Supports a hardware-assisted filter-and-mix operation, instead of the common software version
60 
61 #define AK_SUPPORT_WCHAR ///< Can support wchar
62 #define AK_SUPPORT_THREADS
63 #define AK_71FROM51MIXER ///< Internal use
64 #define AK_71FROMSTEREOMIXER ///< Internal use
65 
66 //#define AK_ENABLE_RAZOR_PROFILING
67 
68 #define AK_CPU_X86_64
69 
70 #define AK_RESTRICT __restrict ///< Refers to the __restrict compilation flag available on some platforms
71 #define AK_EXPECT_FALSE( _x ) ( _x )
72 #define AkRegister
73 #define AkForceInline inline __attribute__((always_inline)) ///< Force inlining
74 #define AkNoInline __attribute__((noinline))
75 
76 #define AK_SIMD_ALIGNMENT 16 ///< Platform-specific alignment requirement for SIMD data
77 #define AK_ALIGN_SIMD( _declaration_ ) AK_ALIGN( _declaration_, AK_SIMD_ALIGNMENT ) ///< Platform-specific alignment requirement for SIMD data
78 
79 #define AK_BUFFER_ALIGNMENT 128 ///< Equal to ACM data alignment, so that we can use any audio buffer as an input/output for ACM processing
80 
81 /// These flags define that a given class of SIMD extensions is available.
82 /// Note that runtime checks MUST be done before entering code that explicitly utilizes one of these classes
83 #define AKSIMD_V4F32_SUPPORTED
84 #define AKSIMD_AVX_SUPPORTED
85 #define AKSIMD_AVX2_SUPPORTED
86 
87 #define AK_DLLEXPORT __declspec(dllexport)
88 #define AK_DLLIMPORT __declspec(dllimport)
89 
90 typedef char AkOSChar; ///< Generic character string
91 typedef wchar_t AkUtf16; ///< Type for 2 byte chars. Used for communication
92  ///< with the authoring tool.
93 
94 typedef ScePthread AkThread; ///< Thread handle
95 typedef ScePthread AkThreadID; ///< Thread ID
96 typedef void* (*AkThreadRoutine)( void* lpThreadParameter ); ///< Thread routine
97 typedef SceKernelEventFlag AkEvent; ///< Event handle
98 typedef SceKernelSema AkSemaphore; ///< Semaphore handle
99 
100 typedef int AkFileHandle; ///< File handle to be used with sceKernel file system calls
101 
102 #define AK_STACKTRACE_MAX_FRAMES 64
103 typedef uintptr_t AkStackTrace[ AK_STACKTRACE_MAX_FRAMES ];
104 
105 #define AK_UINT_MAX UINT_MAX
106 
107 // For strings.
108 #define AK_MAX_PATH SCE_KERNEL_PATH_MAX ///< Maximum path length (each file/dir name is max 255 char)
109 
110 typedef AkUInt32 AkFourcc; ///< Riff chunk
111 
112 /// Create Riff chunk
113 #define AkmmioFOURCC( ch0, ch1, ch2, ch3 ) \
114  ( (AkFourcc)(AkUInt8)(ch0) | ( (AkFourcc)(AkUInt8)(ch1) << 8 ) | \
115  ( (AkFourcc)(AkUInt8)(ch2) << 16 ) | ( (AkFourcc)(AkUInt8)(ch3) << 24 ) )
116 
117 #define AK_BANK_PLATFORM_DATA_ALIGNMENT (256) ///< Required memory alignment for bank loading by memory address for ATRAC9 (see LoadBank())
118 #define AK_BANK_PLATFORM_DATA_NON_ATRAC9_ALIGNMENT (16) ///< Required memory alignment for bank loading by memory address for non-ATRAC9 formats (see LoadBank())
119 
120 #define AK_COMM_CONSOLE_TYPE ConsolePS5
121 
122 /// Format for printing AkOSChar string using OutputDebugMsgV
123 /// Corresponds to "%ls" if AK_OS_WCHAR, else "%s".
124 /// \remark Usage: AKPLATFORM::OutputDebugMsgV(AKTEXT("Print this string: " AK_OSCHAR_FMT "\n", msg));
125 #define AK_OSCHAR_FMT "%s"
126 
127 /// Macro that takes a string litteral and changes it to an AkOSChar string at compile time
128 /// \remark This is similar to the TEXT() and _T() macros that can be used to turn string litterals into Unicode strings
129 /// \remark Usage: AKTEXT( "Some Text" )
130 #define AKTEXT(x) x
131 
132 // easy define for checking for SDK8.00 and its corresponding 12-channel-output support (Atmos)
133 #if (SCE_PROSPERO_SDK_VERSION >= 0x08000026u)
134 #define AK_PROSPERO_SDK_800_OR_LATER true
135 #endif
136 
137 #endif // __PROSPERO__
semaphore_t AkEvent
Definition: AkTypes.h:84
int AkThreadID
Definition: AkTypes.h:69
char AkOSChar
Generic character string.
Definition: AkTypes.h:60
FILE * AkFileHandle
File handle.
Definition: AkTypes.h:77
AkUInt16 AkUtf16
Definition: AkTypes.h:61
int AkThread
Definition: AkTypes.h:68
uint32_t AkUInt32
Unsigned 32-bit integer.
void * AkStackTrace[64]
Definition: AkTypes.h:61
#define AK_STACKTRACE_MAX_FRAMES
Definition: AkTypes.h:92
AkUInt32 AkFourcc
Riff chunk.
Definition: AkTypes.h:84
semaphore_t AkSemaphore
Definition: AkTypes.h:85

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise