Version
menu_open
link

include/AK/SoundEngine/Platforms/PS4/AkTypes.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
00003 released in source code form as part of the SDK installer package.
00004 
00005 Commercial License Usage
00006 
00007 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
00008 may use this file in accordance with the end user license agreement provided 
00009 with the software or, alternatively, in accordance with the terms contained in a
00010 written agreement between you and Audiokinetic Inc.
00011 
00012 Apache License Usage
00013 
00014 Alternatively, this file may be used under the Apache License, Version 2.0 (the 
00015 "Apache License"); you may not use this file except in compliance with the 
00016 Apache License. You may obtain a copy of the Apache License at 
00017 http://www.apache.org/licenses/LICENSE-2.0.
00018 
00019 Unless required by applicable law or agreed to in writing, software distributed
00020 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
00021 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
00022 the specific language governing permissions and limitations under the License.
00023 
00024   Version: <VERSION>  Build: <BUILDNUMBER>
00025   Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc.
00026 *******************************************************************************/
00027 
00028 // AkTypes.h
00029 
00030 /// \file 
00031 /// Data type definitions.
00032 
00033 #pragma once
00034 
00035 #include <stdint.h>
00036 #include <limits.h>
00037 #include <stddef.h>
00038 #include <libdbg.h>
00039 #include <sceconst.h>
00040 #include <scetypes.h>
00041 #include <kernel\eventflag.h>
00042 #include <fios2.h>
00043 #include <kernel.h>
00044 
00045 #define AK_PS4                                  ///< Compiling for PS4
00046     
00047 #define AK_MOTION                               ///< Internal use
00048 #define AK_LFECENTER                            ///< Internal use
00049 #define AK_REARCHANNELS                         ///< Internal use
00050 #define AK_SUPPORT_WCHAR                        ///< Can support wchar
00051 #define AK_71FROM51MIXER                        ///< Internal use
00052 #define AK_71FROMSTEREOMIXER                    ///< Internal use
00053 #define AK_71AUDIO                              ///< Internal use
00054 //#define AK_OS_WCHAR   
00055 
00056 //#define AK_ENABLE_RAZOR_PROFILING
00057 
00058 #ifndef AK_OPTIMIZED
00059     // Define AK_ENABLE_VITACODECENGINEPERFMONITORING to enable "DSP Usage" monitoring (must also be enabled on the app side for Vita)
00060     //#define AK_ENABLE_VITACODECENGINEPERFMONITORING
00061 #endif // AK_OPTIMIZED
00062 
00063 #define AK_CPU_X86_64
00064 
00065 #define AK_RESTRICT             __restrict                              ///< Refers to the __restrict compilation flag available on some platforms
00066 #define AK_FINAL        final                   ///< Refers to the C++11 final keyword
00067 #define AK_EXPECT_FALSE( _x )   ( _x )
00068 #define AkRegister              
00069 #define AkForceInline           inline __attribute__((always_inline))   ///< Force inlining
00070 #define AkNoInline              __attribute__((noinline))
00071 
00072 #define AK_SIMD_ALIGNMENT   16                  ///< Platform-specific alignment requirement for SIMD data
00073 #define AK_ALIGN_SIMD( __Declaration__ ) __Declaration__ __attribute__((aligned(AK_SIMD_ALIGNMENT))) ///< Platform-specific alignment requirement for SIMD data
00074 #define AK_ALIGN_DMA                            ///< Platform-specific data alignment for DMA transfers
00075 #define AK_ALIGN_FASTDMA                        ///< Platform-specific data alignment for faster DMA transfers
00076 #define AK_ALIGN_SIZE_FOR_DMA( __Size__ ) (__Size__) ///< Used to align sizes to next 16 byte boundary on platfroms that require it
00077 #define AK_BUFFER_ALIGNMENT AK_SIMD_ALIGNMENT
00078 #define AKSIMD_V4F32_SUPPORTED
00079 
00080 #define AK_DLLEXPORT __declspec(dllexport)
00081 #define AK_DLLIMPORT __declspec(dllimport)  
00082 
00083 typedef uint8_t         AkUInt8;                ///< Unsigned 8-bit integer
00084 typedef uint16_t        AkUInt16;               ///< Unsigned 16-bit integer
00085 typedef uint32_t        AkUInt32;               ///< Unsigned 32-bit integer
00086 typedef uint64_t        AkUInt64;               ///< Unsigned 64-bit integer
00087 
00088 #ifdef AK_CPU_X86_64
00089 typedef int64_t         AkIntPtr;
00090 typedef uint64_t        AkUIntPtr;
00091 #else 
00092 typedef int             AkIntPtr;
00093 typedef unsigned int    AkUIntPtr;
00094 #endif
00095 
00096 typedef int8_t          AkInt8;                 ///< Signed 8-bit integer
00097 typedef int16_t         AkInt16;                ///< Signed 16-bit integer
00098 typedef int32_t         AkInt32;                ///< Signed 32-bit integer
00099 typedef int64_t         AkInt64;                ///< Signed 64-bit integer
00100 
00101 typedef char            AkOSChar;               ///< Generic character string
00102 
00103 typedef float           AkReal32;               ///< 32-bit floating point
00104 typedef double          AkReal64;               ///< 64-bit floating point
00105 
00106 typedef ScePthread              AkThread;               ///< Thread handle
00107 typedef ScePthread              AkThreadID;             ///< Thread ID
00108 typedef void*                   (*AkThreadRoutine)( void* lpThreadParameter );      ///< Thread routine
00109 typedef SceKernelEventFlag      AkEvent;                ///< Event handle
00110 
00111 typedef SceFiosFH               AkFileHandle;           ///< File handle
00112 
00113 typedef wchar_t                 AkUtf16;                ///< Type for 2 byte chars. Used for communication
00114                                                         ///< with the authoring tool.
00115 
00116 #define AK_CAPTURE_TYPE_FLOAT                           ///< Capture type is float.
00117 typedef AkReal32                AkCaptureType;          ///< Capture type is float.
00118 
00119 #define AK_UINT_MAX             UINT_MAX
00120 
00121 // For strings.
00122 #define AK_MAX_PATH             SCE_FIOS_PATH_MAX       ///< Maximum path length (each file/dir name is max 255 char)
00123 
00124 typedef AkUInt32                AkFourcc;               ///< Riff chunk
00125 
00126 /// Create Riff chunk
00127 #define AkmmioFOURCC( ch0, ch1, ch2, ch3 )                                      \
00128         ( (AkFourcc)(AkUInt8)(ch0) | ( (AkFourcc)(AkUInt8)(ch1) << 8 ) |        \
00129         ( (AkFourcc)(AkUInt8)(ch2) << 16 ) | ( (AkFourcc)(AkUInt8)(ch3) << 24 ) )
00130 
00131 #define AK_BANK_PLATFORM_DATA_ALIGNMENT             (256)   ///< Required memory alignment for bank loading by memory address for ATRAC9 (see LoadBank())
00132 #define AK_BANK_PLATFORM_DATA_NON_ATRAC9_ALIGNMENT  (16)    ///< Required memory alignment for bank loading by memory address for non-ATRAC9 formats (see LoadBank())
00133 
00134 #define AK_BANK_PLATFORM_ALLOC_TYPE     AkMalloc
00135 
00136 /// Macro that takes a string litteral and changes it to an AkOSChar string at compile time
00137 /// \remark This is similar to the TEXT() and _T() macros that can be used to turn string litterals into Unicode strings
00138 /// \remark Usage: AKTEXT( "Some Text" )
00139 #define AKTEXT(x) x

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