Version

menu_open

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_LFECENTER                            ///< Internal use
00048 #define AK_REARCHANNELS                         ///< Internal use
00049 #define AK_SUPPORT_WCHAR                        ///< Can support wchar
00050 #define AK_71FROM51MIXER                        ///< Internal use
00051 #define AK_71FROMSTEREOMIXER                    ///< Internal use
00052 #define AK_71AUDIO                              ///< Internal use
00053 //#define AK_OS_WCHAR   
00054 
00055 //#define AK_ENABLE_RAZOR_PROFILING
00056 
00057 #define AK_CPU_X86_64
00058 
00059 #define AK_RESTRICT             __restrict                              ///< Refers to the __restrict compilation flag available on some platforms
00060 #define AK_FINAL        final                   ///< Refers to the C++11 final keyword
00061 #define AK_EXPECT_FALSE( _x )   ( _x )
00062 #define AkRegister              
00063 #define AkForceInline           inline __attribute__((always_inline))   ///< Force inlining
00064 #define AkNoInline              __attribute__((noinline))
00065 
00066 #define AK_SIMD_ALIGNMENT   16                  ///< Platform-specific alignment requirement for SIMD data
00067 #define AK_ALIGN_SIMD( __Declaration__ ) __Declaration__ __attribute__((aligned(AK_SIMD_ALIGNMENT))) ///< Platform-specific alignment requirement for SIMD data
00068 #define AK_ALIGN_DMA                            ///< Platform-specific data alignment for DMA transfers
00069 #define AK_ALIGN_FASTDMA                        ///< Platform-specific data alignment for faster DMA transfers
00070 #define AK_ALIGN_SIZE_FOR_DMA( __Size__ ) (__Size__) ///< Used to align sizes to next 16 byte boundary on platfroms that require it
00071 #define AK_BUFFER_ALIGNMENT AK_SIMD_ALIGNMENT
00072 #define AKSIMD_V4F32_SUPPORTED
00073 
00074 #define AK_DLLEXPORT __declspec(dllexport)
00075 #define AK_DLLIMPORT __declspec(dllimport)  
00076 
00077 typedef uint8_t         AkUInt8;                ///< Unsigned 8-bit integer
00078 typedef uint16_t        AkUInt16;               ///< Unsigned 16-bit integer
00079 typedef uint32_t        AkUInt32;               ///< Unsigned 32-bit integer
00080 typedef uint64_t        AkUInt64;               ///< Unsigned 64-bit integer
00081 
00082 #ifdef AK_CPU_X86_64
00083 typedef int64_t         AkIntPtr;
00084 typedef uint64_t        AkUIntPtr;
00085 #else 
00086 typedef int             AkIntPtr;
00087 typedef unsigned int    AkUIntPtr;
00088 #endif
00089 
00090 typedef int8_t          AkInt8;                 ///< Signed 8-bit integer
00091 typedef int16_t         AkInt16;                ///< Signed 16-bit integer
00092 typedef int32_t         AkInt32;                ///< Signed 32-bit integer
00093 typedef int64_t         AkInt64;                ///< Signed 64-bit integer
00094 
00095 typedef char            AkOSChar;               ///< Generic character string
00096 
00097 typedef float           AkReal32;               ///< 32-bit floating point
00098 typedef double          AkReal64;               ///< 64-bit floating point
00099 
00100 typedef ScePthread              AkThread;               ///< Thread handle
00101 typedef ScePthread              AkThreadID;             ///< Thread ID
00102 typedef void*                   (*AkThreadRoutine)( void* lpThreadParameter );      ///< Thread routine
00103 typedef SceKernelEventFlag      AkEvent;                ///< Event handle
00104 
00105 typedef SceFiosFH               AkFileHandle;           ///< File handle
00106 
00107 typedef wchar_t                 AkUtf16;                ///< Type for 2 byte chars. Used for communication
00108                                                         ///< with the authoring tool.
00109 
00110 #define AK_UINT_MAX             UINT_MAX
00111 
00112 // For strings.
00113 #define AK_MAX_PATH             SCE_FIOS_PATH_MAX       ///< Maximum path length (each file/dir name is max 255 char)
00114 
00115 typedef AkUInt32                AkFourcc;               ///< Riff chunk
00116 
00117 /// Create Riff chunk
00118 #define AkmmioFOURCC( ch0, ch1, ch2, ch3 )                                      \
00119         ( (AkFourcc)(AkUInt8)(ch0) | ( (AkFourcc)(AkUInt8)(ch1) << 8 ) |        \
00120         ( (AkFourcc)(AkUInt8)(ch2) << 16 ) | ( (AkFourcc)(AkUInt8)(ch3) << 24 ) )
00121 
00122 #define AK_BANK_PLATFORM_DATA_ALIGNMENT             (256)   ///< Required memory alignment for bank loading by memory address for ATRAC9 (see LoadBank())
00123 #define AK_BANK_PLATFORM_DATA_NON_ATRAC9_ALIGNMENT  (16)    ///< Required memory alignment for bank loading by memory address for non-ATRAC9 formats (see LoadBank())
00124 
00125 #define AK_BANK_PLATFORM_ALLOC_TYPE     AkMalloc
00126 
00127 /// Macro that takes a string litteral and changes it to an AkOSChar string at compile time
00128 /// \remark This is similar to the TEXT() and _T() macros that can be used to turn string litterals into Unicode strings
00129 /// \remark Usage: AKTEXT( "Some Text" )
00130 #define AKTEXT(x) x

Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise