Wwise SDK 2016.2.6
_common_2_ak_types_8h_source
Version
menu_open
link
include/AK/SoundEngine/Common/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 00032 00033 #ifndef _AK_DATA_TYPES_H_ 00034 #define _AK_DATA_TYPES_H_ 00035 00036 // Platform-specific section. 00037 //---------------------------------------------------------------------------------------------------- 00038 #include <AK/AkPlatforms.h> 00039 00040 00041 //---------------------------------------------------------------------------------------------------- 00042 00043 #include <AK/SoundEngine/Common/AkSoundEngineExport.h> 00044 00045 #ifndef NULL 00046 #ifdef __cplusplus 00047 #define NULL 0 00048 #else 00049 #define NULL ((void *)0) 00050 #endif 00051 #endif 00052 00053 #ifdef AK_USE_STD_ATOMIC 00054 // Apple, starting with iOS 10 and MacOS 10.12 is enforcing the type of objects on which we use Atomic Operations. 00055 #include <stdatomic.h> 00056 00057 typedef _Atomic(AkInt32) AkAtomic32; 00058 typedef _Atomic(AkInt64) AkAtomic64; 00059 typedef _Atomic(AkUInt32) AkAtomicU32; 00060 typedef _Atomic(AkIntPtr) AkAtomicPtr; 00061 #else 00062 typedef AkInt32 AkAtomic32; 00063 typedef AkInt64 AkAtomic64; 00064 typedef AkUInt32 AkAtomicU32; 00065 typedef AkIntPtr AkAtomicPtr; 00066 #endif 00067 00068 typedef AkUInt32 AkUniqueID; 00069 typedef AkUInt32 AkStateID; 00070 typedef AkUInt32 AkStateGroupID; 00071 typedef AkUInt32 AkPlayingID; 00072 typedef AkInt32 AkTimeMs; 00073 typedef AkReal32 AkPitchValue; 00074 typedef AkReal32 AkVolumeValue; 00075 typedef AkUIntPtr AkGameObjectID; 00076 typedef AkReal32 AkLPFType; 00077 typedef AkInt32 AkMemPoolId; 00078 typedef AkUInt32 AkPluginID; 00079 typedef AkUInt32 AkCodecID; 00080 typedef AkUInt32 AkAuxBusID; 00081 typedef AkInt16 AkPluginParamID; 00082 typedef AkInt8 AkPriority; 00083 typedef AkUInt16 AkDataCompID; 00084 typedef AkUInt16 AkDataTypeID; 00085 typedef AkUInt8 AkDataInterleaveID; 00086 typedef AkUInt32 AkSwitchGroupID; 00087 typedef AkUInt32 AkSwitchStateID; 00088 typedef AkUInt32 AkRtpcID; 00089 typedef AkReal32 AkRtpcValue; 00090 typedef AkUInt32 AkBankID; 00091 typedef AkUInt32 AkFileID; 00092 typedef AkUInt32 AkDeviceID; 00093 typedef AkUInt32 AkTriggerID; 00094 typedef AkUInt32 AkArgumentValueID; 00095 typedef AkUInt32 AkChannelMask; 00096 typedef AkUInt32 AkModulatorID; 00097 typedef AkUInt32 AkAcousticTextureID; 00098 typedef AkUInt32 AkDiffuseReverberatorID; 00099 00100 // Constants. 00101 static const AkPluginID AK_INVALID_PLUGINID = (AkPluginID)-1; 00102 static const AkGameObjectID AK_INVALID_GAME_OBJECT = (AkGameObjectID)-1; 00103 static const AkUniqueID AK_INVALID_UNIQUE_ID = 0; 00104 static const AkRtpcID AK_INVALID_RTPC_ID = AK_INVALID_UNIQUE_ID; 00105 static const AkUInt32 AK_INVALID_LISTENER_INDEX = (AkUInt32)-1; 00106 static const AkPlayingID AK_INVALID_PLAYING_ID = AK_INVALID_UNIQUE_ID; 00107 static const AkUInt32 AK_DEFAULT_SWITCH_STATE = 0; 00108 static const AkMemPoolId AK_INVALID_POOL_ID = -1; 00109 static const AkMemPoolId AK_DEFAULT_POOL_ID = -1; 00110 static const AkAuxBusID AK_INVALID_AUX_ID = AK_INVALID_UNIQUE_ID; 00111 static const AkFileID AK_INVALID_FILE_ID = (AkFileID)-1; 00112 static const AkDeviceID AK_INVALID_DEVICE_ID = (AkDeviceID)-1; 00113 static const AkBankID AK_INVALID_BANK_ID = AK_INVALID_UNIQUE_ID; 00114 static const AkArgumentValueID AK_FALLBACK_ARGUMENTVALUE_ID = 0; 00115 static const AkChannelMask AK_INVALID_CHANNELMASK = 0; 00116 static const AkUInt32 AK_INVALID_OUTPUT_DEVICE_ID = AK_INVALID_UNIQUE_ID; 00117 static const AkUInt32 AK_MIXER_FX_SLOT = (AkUInt32)-1; 00118 00119 // Priority. 00120 static const AkPriority AK_DEFAULT_PRIORITY = 50; 00121 static const AkPriority AK_MIN_PRIORITY = 0; 00122 static const AkPriority AK_MAX_PRIORITY = 100; 00123 00124 // Default bank I/O settings. 00125 static const AkPriority AK_DEFAULT_BANK_IO_PRIORITY = AK_DEFAULT_PRIORITY; 00126 static const AkReal32 AK_DEFAULT_BANK_THROUGHPUT = 1*1024*1024/1000.f; 00127 00128 // Bank version 00129 static const AkUInt32 AK_SOUNDBANK_VERSION = 120; 00130 00132 enum AKRESULT 00133 { 00134 AK_NotImplemented = 0, 00135 AK_Success = 1, 00136 AK_Fail = 2, 00137 AK_PartialSuccess = 3, 00138 AK_NotCompatible = 4, 00139 AK_AlreadyConnected = 5, 00140 AK_NameNotSet = 6, 00141 AK_InvalidFile = 7, 00142 AK_AudioFileHeaderTooLarge = 8, 00143 AK_MaxReached = 9, 00144 AK_InputsInUsed = 10, 00145 AK_OutputsInUsed = 11, 00146 AK_InvalidName = 12, 00147 AK_NameAlreadyInUse = 13, 00148 AK_InvalidID = 14, 00149 AK_IDNotFound = 15, 00150 AK_InvalidInstanceID = 16, 00151 AK_NoMoreData = 17, 00152 AK_NoSourceAvailable = 18, 00153 AK_StateGroupAlreadyExists = 19, 00154 AK_InvalidStateGroup = 20, 00155 AK_ChildAlreadyHasAParent = 21, 00156 AK_InvalidLanguage = 22, 00157 AK_CannotAddItseflAsAChild = 23, 00158 //AK_TransitionNotFound = 24, ///< The transition is not in the list. 00159 //AK_TransitionNotStartable = 25, ///< Start allowed in the Running and Done states. 00160 //AK_TransitionNotRemovable = 26, ///< Must not be in the Computing state. 00161 //AK_UsersListFull = 27, ///< No one can be added any more, could be AK_MaxReached. 00162 //AK_UserAlreadyInList = 28, ///< This user is already there. 00163 AK_UserNotInList = 29, 00164 AK_NoTransitionPoint = 30, 00165 AK_InvalidParameter = 31, 00166 AK_ParameterAdjusted = 32, 00167 AK_IsA3DSound = 33, 00168 AK_NotA3DSound = 34, 00169 AK_ElementAlreadyInList = 35, 00170 AK_PathNotFound = 36, 00171 AK_PathNoVertices = 37, 00172 AK_PathNotRunning = 38, 00173 AK_PathNotPaused = 39, 00174 AK_PathNodeAlreadyInList = 40, 00175 AK_PathNodeNotInList = 41, 00176 AK_VoiceNotFound = 42, 00177 AK_DataNeeded = 43, 00178 AK_NoDataNeeded = 44, 00179 AK_DataReady = 45, 00180 AK_NoDataReady = 46, 00181 AK_NoMoreSlotAvailable = 47, 00182 AK_SlotNotFound = 48, 00183 AK_ProcessingOnly = 49, 00184 AK_MemoryLeak = 50, 00185 AK_CorruptedBlockList = 51, 00186 AK_InsufficientMemory = 52, 00187 AK_Cancelled = 53, 00188 AK_UnknownBankID = 54, 00189 AK_IsProcessing = 55, 00190 AK_BankReadError = 56, 00191 AK_InvalidSwitchType = 57, 00192 AK_VoiceDone = 58, 00193 AK_UnknownEnvironment = 59, 00194 AK_EnvironmentInUse = 60, 00195 AK_UnknownObject = 61, 00196 AK_NoConversionNeeded = 62, 00197 AK_FormatNotReady = 63, 00198 AK_WrongBankVersion = 64, 00199 AK_DataReadyNoProcess = 65, 00200 AK_FileNotFound = 66, 00201 AK_DeviceNotReady = 67, 00202 AK_CouldNotCreateSecBuffer = 68, 00203 AK_BankAlreadyLoaded = 69, 00204 AK_RenderedFX = 71, 00205 AK_ProcessNeeded = 72, 00206 AK_ProcessDone = 73, 00207 AK_MemManagerNotInitialized = 74, 00208 AK_StreamMgrNotInitialized = 75, 00209 AK_SSEInstructionsNotSupported = 76, 00210 AK_Busy = 77, 00211 AK_UnsupportedChannelConfig = 78, 00212 AK_PluginMediaNotAvailable = 79, 00213 AK_MustBeVirtualized = 80, 00214 AK_CommandTooLarge = 81, 00215 AK_RejectedByFilter = 82, 00216 AK_InvalidCustomPlatformName= 83, 00217 AK_DLLCannotLoad = 84 00218 }; 00219 00221 enum AkGroupType 00222 { 00223 // should stay set as Switch = 0 and State = 1 00224 AkGroupType_Switch = 0, 00225 AkGroupType_State = 1 00226 }; 00227 00234 struct AkExternalSourceInfo 00235 { 00236 AkUInt32 iExternalSrcCookie; 00237 AkCodecID idCodec; 00238 AkOSChar * szFile; 00239 void* pInMemory; 00240 AkUInt32 uiMemorySize; 00241 AkFileID idFile; 00242 00244 AkExternalSourceInfo() 00245 : iExternalSrcCookie( 0 ) 00246 , idCodec( 0 ) 00247 , szFile( 0 ) 00248 , pInMemory( 0 ) 00249 , uiMemorySize( 0 ) 00250 , idFile( 0 ) {} 00251 00253 AkExternalSourceInfo( 00254 void* in_pInMemory, 00255 AkUInt32 in_uiMemorySize, 00256 AkUInt32 in_iExternalSrcCookie, 00257 AkCodecID in_idCodec 00258 ) 00259 : iExternalSrcCookie( in_iExternalSrcCookie ) 00260 , idCodec( in_idCodec ) 00261 , szFile( 0 ) 00262 , pInMemory( in_pInMemory ) 00263 , uiMemorySize( in_uiMemorySize ) 00264 , idFile( 0 ) {} 00265 00267 AkExternalSourceInfo( 00268 AkOSChar * in_pszFileName, 00269 AkUInt32 in_iExternalSrcCookie, 00270 AkCodecID in_idCodec 00271 ) 00272 : iExternalSrcCookie( in_iExternalSrcCookie ) 00273 , idCodec( in_idCodec ) 00274 , szFile( in_pszFileName ) 00275 , pInMemory( 0 ) 00276 , uiMemorySize( 0 ) 00277 , idFile( 0 ) {} 00278 00280 AkExternalSourceInfo( 00281 AkFileID in_idFile, 00282 AkUInt32 in_iExternalSrcCookie, 00283 AkCodecID in_idCodec 00284 ) 00285 : iExternalSrcCookie( in_iExternalSrcCookie ) 00286 , idCodec( in_idCodec ) 00287 , szFile( 0 ) 00288 , pInMemory( 0 ) 00289 , uiMemorySize( 0 ) 00290 , idFile( in_idFile ) {} 00291 }; 00292 00294 enum AkConnectionType 00295 { 00296 ConnectionType_Direct = 0x0, 00297 ConnectionType_GameDefSend = 0x1, 00298 ConnectionType_UserDefSend = 0x2, 00299 ConnectionType_CrossDeviceSend = 0x4 00300 }; 00301 00303 struct AkVector 00304 { 00305 AkReal32 X; 00306 AkReal32 Y; 00307 AkReal32 Z; 00308 }; 00309 00311 class AkTransform 00312 { 00313 public: 00314 // 00315 // Getters. 00316 // 00317 00319 inline const AkVector & Position() const 00320 { 00321 return position; 00322 } 00323 00325 inline const AkVector & OrientationFront() const 00326 { 00327 return orientationFront; 00328 } 00329 00331 inline const AkVector & OrientationTop() const 00332 { 00333 return orientationTop; 00334 } 00335 00336 // 00337 // Setters. 00338 // 00339 00341 inline void Set( 00342 const AkVector & in_position, 00343 const AkVector & in_orientationFront, 00344 const AkVector & in_orientationTop 00345 ) 00346 { 00347 position = in_position; 00348 orientationFront = in_orientationFront; 00349 orientationTop = in_orientationTop; 00350 } 00351 00353 inline void Set( 00354 AkReal32 in_positionX, 00355 AkReal32 in_positionY, 00356 AkReal32 in_positionZ, 00357 AkReal32 in_orientFrontX, 00358 AkReal32 in_orientFrontY, 00359 AkReal32 in_orientFrontZ, 00360 AkReal32 in_orientTopX, 00361 AkReal32 in_orientTopY, 00362 AkReal32 in_orientTopZ 00363 ) 00364 { 00365 position.X = in_positionX; 00366 position.Y = in_positionY; 00367 position.Z = in_positionZ; 00368 orientationFront.X = in_orientFrontX; 00369 orientationFront.Y = in_orientFrontY; 00370 orientationFront.Z = in_orientFrontZ; 00371 orientationTop.X = in_orientTopX; 00372 orientationTop.Y = in_orientTopY; 00373 orientationTop.Z = in_orientTopZ; 00374 } 00375 00377 inline void SetPosition( 00378 const AkVector & in_position 00379 ) 00380 { 00381 position = in_position; 00382 } 00383 00385 inline void SetPosition( 00386 AkReal32 in_x, 00387 AkReal32 in_y, 00388 AkReal32 in_z 00389 ) 00390 { 00391 position.X = in_x; 00392 position.Y = in_y; 00393 position.Z = in_z; 00394 } 00395 00397 inline void SetOrientation( 00398 const AkVector & in_orientationFront, 00399 const AkVector & in_orientationTop 00400 ) 00401 { 00402 orientationFront = in_orientationFront; 00403 orientationTop = in_orientationTop; 00404 } 00405 00407 inline void SetOrientation( 00408 AkReal32 in_orientFrontX, 00409 AkReal32 in_orientFrontY, 00410 AkReal32 in_orientFrontZ, 00411 AkReal32 in_orientTopX, 00412 AkReal32 in_orientTopY, 00413 AkReal32 in_orientTopZ 00414 ) 00415 { 00416 orientationFront.X = in_orientFrontX; 00417 orientationFront.Y = in_orientFrontY; 00418 orientationFront.Z = in_orientFrontZ; 00419 orientationTop.X = in_orientTopX; 00420 orientationTop.Y = in_orientTopY; 00421 orientationTop.Z = in_orientTopZ; 00422 } 00423 00424 private: 00425 AkVector orientationFront; 00426 AkVector orientationTop; 00427 AkVector position; 00428 }; 00429 00431 typedef AkTransform AkSoundPosition; 00432 00434 typedef AkTransform AkListenerPosition; 00435 00436 00438 struct AkChannelEmitter 00439 { 00440 AkTransform position; 00441 AkChannelMask uInputChannels; 00442 }; 00443 00445 struct AkPolarCoord 00446 { 00447 AkReal32 r; 00448 AkReal32 theta; 00449 }; 00450 00452 struct AkSphericalCoord : public AkPolarCoord 00453 { 00454 AkReal32 phi; 00455 }; 00456 00460 class AkEmitterListenerPair : public AkSphericalCoord 00461 { 00462 public: 00464 AkEmitterListenerPair() 00465 : fEmitterAngle( 0.f ) 00466 , fDryMixGain( 1.f ) 00467 , fGameDefAuxMixGain( 1.f ) 00468 , fUserDefAuxMixGain( 1.f ) 00469 , uEmitterChannelMask( 0xFFFFFFFF ) 00470 , m_uListenerMask( 0 ) 00471 { 00472 r = 0; 00473 theta = 0; 00474 phi = 0; 00475 } 00477 ~AkEmitterListenerPair() {} 00478 00480 inline AkReal32 Distance() const { return r; } 00481 00483 inline AkReal32 Azimuth() const { return theta; } 00484 00486 inline AkReal32 Elevation() const { return phi; } 00487 00490 inline AkReal32 EmitterAngle() const { return fEmitterAngle; } 00491 00493 inline AkReal32 GetGainForConnectionType(AkConnectionType in_eType) const 00494 { 00495 AkConnectionType eType = (AkConnectionType)(in_eType & ~ConnectionType_CrossDeviceSend); 00496 if (eType == ConnectionType_Direct) 00497 return fDryMixGain; 00498 else if (eType == ConnectionType_GameDefSend) 00499 return fGameDefAuxMixGain; 00500 else 00501 return fUserDefAuxMixGain; 00502 } 00503 00505 inline AkUInt32 ListenerMask() const { return m_uListenerMask; } 00506 00507 // Get listener index of first listener assigned to this emitter-listener pair. 00509 inline AkUInt8 ListenerIdx() const 00510 { 00511 AkUInt8 uListenerIdx = 0; 00512 AkUInt8 uListenerMask = m_uListenerMask; 00513 while ( !( uListenerMask & 0x01 ) ) 00514 { 00515 uListenerMask >>= 1; 00516 ++uListenerIdx; 00517 } 00518 return uListenerIdx; 00519 } 00520 00521 AkTransform emitter; 00522 AkReal32 fEmitterAngle; 00523 AkReal32 fDryMixGain; 00524 AkReal32 fGameDefAuxMixGain; 00525 AkReal32 fUserDefAuxMixGain; 00526 AkChannelMask uEmitterChannelMask; 00527 protected: 00528 AkUInt8 m_uListenerMask; 00529 }; 00530 00532 struct AkListener 00533 { 00534 AkListener() 00535 : fScalingFactor( 1.0f ) 00536 , bSpatialized( true ) 00537 {} 00538 AkListenerPosition position; 00539 AkReal32 fScalingFactor; 00540 bool bSpatialized; 00541 }; 00542 00544 enum AkCurveInterpolation 00545 { 00546 //DONT GO BEYOND 15! (see below for details) 00547 //Curves from 0 to LastFadeCurve NEED TO BE A MIRROR IMAGE AROUND LINEAR (eg. Log3 is the inverse of Exp3) 00548 AkCurveInterpolation_Log3 = 0, 00549 AkCurveInterpolation_Sine = 1, 00550 AkCurveInterpolation_Log1 = 2, 00551 AkCurveInterpolation_InvSCurve = 3, 00552 AkCurveInterpolation_Linear = 4, 00553 AkCurveInterpolation_SCurve = 5, 00554 AkCurveInterpolation_Exp1 = 6, 00555 AkCurveInterpolation_SineRecip = 7, 00556 AkCurveInterpolation_Exp3 = 8, 00557 AkCurveInterpolation_LastFadeCurve = 8, 00558 AkCurveInterpolation_Constant = 9 00559 //DONT GO BEYOND 15! The value is stored on 5 bits, 00560 //but we can use only 4 bits for the actual values, keeping 00561 //the 5th bit at 0 to void problems when the value is 00562 //expanded to 32 bits. 00563 }; 00564 #define AKCURVEINTERPOLATION_NUM_STORAGE_BIT 5 ///< Internal storage restriction, for internal use only. 00565 00566 #ifndef AK_MAX_AUX_PER_OBJ 00567 #define AK_MAX_AUX_PER_OBJ (4) ///< Maximum number of environments in which a single game object may be located at a given time. 00568 00569 // This define is there to Limit the number of Aux per sound that can be processed. 00570 // This value must be >= AK_MAX_AUX_PER_OBJ and >= AK_NUM_AUX_SEND_PER_OBJ (4) 00571 #define AK_MAX_AUX_SUPPORTED (AK_MAX_AUX_PER_OBJ + 4) 00572 #else 00573 // This define is there to Limit the number of Aux per sound that can be processed. 00574 // This value must be >= AK_MAX_AUX_PER_OBJ and >= AK_MAX_AUX_PER_NODE 00575 #define AK_MAX_AUX_SUPPORTED AK_MAX_AUX_PER_OBJ 00576 00577 #endif 00578 00579 #define AK_NUM_LISTENERS (8) ///< Number of listeners that can be used. 00580 #define AK_LISTENERS_MASK_ALL (0xFFFFFFFF) ///< All listeners. 00581 00583 struct AkAuxSendValue 00584 { 00585 AkAuxBusID auxBusID; 00586 AkReal32 fControlValue; 00587 }; 00588 00590 struct AkRamp 00591 { 00592 AkRamp() : fPrev( 1.f ), fNext( 1.f ) {} 00593 AkRamp( AkReal32 in_fPrev, AkReal32 in_fNext ) : fPrev( in_fPrev ), fNext( in_fNext ) {} 00594 AkRamp & operator*=(const AkRamp& in_rRhs) { fPrev *= in_rRhs.fPrev; fNext *= in_rRhs.fNext; return *this; } 00595 00596 AkReal32 fPrev; 00597 AkReal32 fNext; 00598 }; 00599 inline AkRamp operator*(const AkRamp& in_rLhs, const AkRamp& in_rRhs) 00600 { 00601 AkRamp result(in_rLhs); 00602 result *= in_rRhs; 00603 return result; 00604 } 00605 00606 #ifndef AK_MEMPOOLATTRIBUTES 00607 00616 enum AkMemPoolAttributes 00617 { 00618 AkNoAlloc = 0, 00619 AkMalloc = 1, 00620 AkAllocMask = AkNoAlloc | AkMalloc, 00621 00622 AkFixedSizeBlocksMode = 1<<3, 00623 AkBlockMgmtMask = AkFixedSizeBlocksMode 00624 }; 00625 #define AK_MEMPOOLATTRIBUTES 00626 00627 #endif 00628 00629 namespace AK 00630 { 00638 AK_EXTERNFUNC( void *, AllocHook )( 00639 size_t in_size 00640 ); 00641 00648 AK_EXTERNFUNC( void, FreeHook )( 00649 void * in_pMemAddress 00650 ); 00651 } 00652 00653 // --------------------------------------------------------------- 00654 // Languages 00655 // --------------------------------------------------------------- 00656 #define AK_MAX_LANGUAGE_NAME_SIZE (32) 00657 00658 // --------------------------------------------------------------- 00659 // File Type ID Definitions 00660 // --------------------------------------------------------------- 00661 00662 // These correspond to IDs specified in the conversion plug-ins' XML 00663 // files. Audio sources persist them to "remember" their format. 00664 // DO NOT CHANGE THEM without talking to someone in charge of persistence! 00665 00666 // Vendor ID. 00667 #define AKCOMPANYID_AUDIOKINETIC (0) ///< Audiokinetic inc. 00668 #define AKCOMPANYID_AUDIOKINETIC_EXTERNAL (1) ///< Audiokinetic inc. 00669 #define AKCOMPANYID_MCDSP (256) ///< McDSP 00670 #define AKCOMPANYID_WAVEARTS (257) ///< WaveArts 00671 #define AKCOMPANYID_PHONETICARTS (258) ///< Phonetic Arts 00672 #define AKCOMPANYID_IZOTOPE (259) ///< iZotope 00673 #define AKCOMPANYID_GENAUDIO (260) ///< GenAudio 00674 #define AKCOMPANYID_CRANKCASEAUDIO (261) ///< Crankcase Audio 00675 #define AKCOMPANYID_IOSONO (262) ///< IOSONO 00676 #define AKCOMPANYID_AUROTECHNOLOGIES (263) ///< Auro Technologies 00677 #define AKCOMPANYID_DOLBY (264) ///< Dolby 00678 #define AKCOMPANYID_TWOBIGEARS (265) ///< Two Big Ears 00679 #define AKCOMPANYID_OCULUS (266) ///< Oculus 00680 #define AKCOMPANYID_BLUERIPPLESOUND (267) ///< Blue Ripple Sound 00681 #define AKCOMPANYID_ENZIEN (268) ///< Enzien Audio 00682 #define AKCOMPANYID_KROTOS (269) ///< Krotos (Dehumanizer) 00683 #define AKCOMPANYID_NURULIZE (270) ///< Nurulize 00684 #define AKCOMPANYID_SUPERPOWERED (271) ///< Super Powered 00685 #define AKCOMPANYID_GOOGLE (272) ///< Google 00686 00687 // File/encoding types of Audiokinetic. 00688 #define AKCODECID_BANK (0) ///< Bank encoding 00689 #define AKCODECID_PCM (1) ///< PCM encoding 00690 #define AKCODECID_ADPCM (2) ///< ADPCM encoding 00691 #define AKCODECID_XMA (3) ///< XMA encoding 00692 #define AKCODECID_VORBIS (4) ///< Vorbis encoding 00693 #define AKCODECID_WIIADPCM (5) ///< ADPCM encoding on the Wii 00694 #define AKCODECID_PCMEX (7) ///< Standard PCM WAV file parser for Wwise Authoring 00695 #define AKCODECID_EXTERNAL_SOURCE (8) ///< External Source (unknown encoding) 00696 #define AKCODECID_XWMA (9) ///< xWMA encoding 00697 #define AKCODECID_AAC (10) ///< AAC encoding (only available on Apple devices) -- see AkAACFactory.h 00698 #define AKCODECID_FILE_PACKAGE (11) ///< File package files generated by the File Packager utility. 00699 #define AKCODECID_ATRAC9 (12) ///< ATRAC-9 encoding 00700 #define AKCODECID_VAG (13) ///< VAG/HE-VAG encoding 00701 #define AKCODECID_PROFILERCAPTURE (14) ///< Profiler capture file (.prof) as written through AK::SoundEngine::StartProfilerCapture 00702 #define AKCODECID_ANALYSISFILE (15) ///< Analysis file 00703 #define AKCODECID_MIDI (16) ///< MIDI file 00704 #define AKCODECID_OPUS (17) ///< Opus encoding 00705 00706 //The following are internally defined 00707 #define AK_WAVE_FORMAT_VAG 0xFFFB 00708 #define AK_WAVE_FORMAT_AT9 0xFFFC 00709 #define AK_WAVE_FORMAT_VORBIS 0xFFFF 00710 #define AK_WAVE_FORMAT_AAC 0xAAC0 00711 #define AK_WAVE_FORMAT_OPUS 0x3039 00712 #define WAVE_FORMAT_XMA2 0x166 00713 00714 class IAkSoftwareCodec; 00716 AK_CALLBACK( IAkSoftwareCodec*, AkCreateFileSourceCallback )( void* in_pCtx ); 00718 AK_CALLBACK( IAkSoftwareCodec*, AkCreateBankSourceCallback )( void* in_pCtx ); 00719 00720 //----------------------------------------------------------------------------- 00721 // Positioning 00722 //----------------------------------------------------------------------------- 00723 00724 namespace AK 00725 { 00726 namespace SoundEngine 00727 { 00732 enum MultiPositionType 00733 { 00734 MultiPositionType_SingleSource, 00735 MultiPositionType_MultiSources, 00736 MultiPositionType_MultiDirections 00737 }; 00738 } 00739 } 00740 00742 #define PANNER_NUM_STORAGE_BITS 2 00743 enum AkPannerType 00744 { 00745 Ak2D = 0, 00746 Ak3D = 1 00747 }; 00748 00749 #define POSSOURCE_NUM_STORAGE_BITS 2 00750 enum AkPositionSourceType 00751 { 00752 AkUserDef = 0, 00753 AkGameDef = 1 00754 }; 00755 00757 enum AkPanningRule 00758 { 00759 AkPanningRule_Speakers = 0, 00760 AkPanningRule_Headphones = 1 00761 }; 00762 00764 enum AkBusType 00765 { 00766 AkBusType_Master = 0x01, 00767 AkBusType_Primary = 0x02 00768 }; 00769 00770 #define AK_MAX_BITS_METERING_FLAGS (5) // Keep in sync with AkMeteringFlags. 00771 00773 enum AkMeteringFlags 00774 { 00775 AK_NoMetering = 0, 00776 AK_EnableBusMeter_Peak = 1 << 0, 00777 AK_EnableBusMeter_TruePeak = 1 << 1, 00778 AK_EnableBusMeter_RMS = 1 << 2, 00779 // 1 << 3 is reserved. 00780 AK_EnableBusMeter_KPower = 1 << 4 00781 }; 00782 00784 // Wwise ID system 00786 enum AkNodeType 00787 { 00788 AkNodeType_Default, 00789 AkNodeType_Bus 00790 }; 00791 00792 struct WwiseObjectIDext 00793 { 00794 public: 00795 00796 bool operator == ( const WwiseObjectIDext& in_rOther ) const 00797 { 00798 return in_rOther.id == id && in_rOther.bIsBus == bIsBus; 00799 } 00800 00801 AkNodeType GetType() 00802 { 00803 return bIsBus ? AkNodeType_Bus : AkNodeType_Default; 00804 } 00805 00806 AkUniqueID id; 00807 bool bIsBus; 00808 }; 00809 00810 struct WwiseObjectID : public WwiseObjectIDext 00811 { 00812 WwiseObjectID() 00813 { 00814 id = AK_INVALID_UNIQUE_ID; 00815 bIsBus = false; 00816 } 00817 00818 WwiseObjectID( AkUniqueID in_ID ) 00819 { 00820 id = in_ID; 00821 bIsBus = false; 00822 } 00823 00824 WwiseObjectID( AkUniqueID in_ID, bool in_bIsBus ) 00825 { 00826 id = in_ID; 00827 bIsBus = in_bIsBus; 00828 } 00829 00830 WwiseObjectID( AkUniqueID in_ID, AkNodeType in_eNodeType ) 00831 { 00832 id = in_ID; 00833 bIsBus = in_eNodeType == AkNodeType_Bus; 00834 } 00835 }; 00836 00837 #ifndef __SPU__ 00838 00839 namespace AkFileParser 00840 { 00841 #pragma pack(push, 1) 00842 00843 struct EnvelopePoint 00844 { 00845 AkUInt32 uPosition; 00846 AkUInt16 uAttenuation; 00847 }; 00848 #pragma pack(pop) 00849 } 00850 #endif // !__SPU__ 00851 00852 #ifndef AK_OS_STRUCT_ALIGN 00853 #define AK_OS_STRUCT_ALIGN 4 ///< OS Structures need to be aligned at 4 bytes. 00854 #endif 00855 00856 #if !defined(AK_ENDIANNESS_LITTLE) && !defined(AK_ENDIANNESS_BIG) 00857 #define AK_ENDIANNESS_LITTLE 00858 #endif 00859 00860 #ifndef AK_UNALIGNED 00861 #define AK_UNALIGNED ///< Refers to the __unaligned compilation flag available on some platforms. Note that so far, on the tested platform this should always be placed before the pointer symbol *. 00862 #endif 00863 00864 #ifndef AK_ASYNC_OPEN_DEFAULT 00865 #define AK_ASYNC_OPEN_DEFAULT (false) ///< Refers to asynchronous file opening in default low-level IO. 00866 #endif 00867 00868 #ifndef AK_COMM_DEFAULT_DISCOVERY_PORT 00869 #define AK_COMM_DEFAULT_DISCOVERY_PORT 24024 ///< Default discovery port for most platforms using IP sockets for communication. 00870 #endif 00871 00872 #ifndef AK_CAPTURE_TYPE_FLOAT 00873 typedef AkInt16 AkCaptureType; 00874 #endif 00875 00876 #if defined(AK_CPU_X86_64) || defined(AK_CPU_ARM_64) 00877 #define AK_POINTER_64 00878 #endif // #if defined(AK_CPU_X86_64) || defined(AK_CPU_ARM_64) 00879 00880 #define AkRegister 00881 00882 #endif //_AK_DATA_TYPES_H_
Was this page helpful?
Need Support?
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageTell 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