28 #ifndef _AK_MIXERINPUTMAP_H_
29 #define _AK_MIXERINPUTMAP_H_
31 #include <AK/SoundEngine/Common/AkTypes.h>
33 #include <AK/SoundEngine/Common/IAkPluginMemAlloc.h>
34 #include <AK/Tools/Common/AkArray.h>
35 #include <AK/SoundEngine/Common/IAkPlugin.h>
62 template <
class USER_DATA>
80 AkForceInline
void *
Alloc(
size_t in_uSize ) { AKASSERT( m_pAllocator || !
"Allocator not set. Did you forget to call AkMixerInputMap::Init()?" );
return AK_PLUGIN_ALLOC( m_pAllocator, in_uSize ); }
81 AkForceInline
void *
ReAlloc(
void * in_pCurrent,
size_t in_uOldSize,
size_t in_uNewSize)
83 void* pNew =
Alloc(in_uNewSize);
84 if (pNew && in_pCurrent)
92 AkForceInline
void Free(
void * in_pAddress ) { AKASSERT( m_pAllocator || !
"Allocator not set. Did you forget to call AkMixerInputMap::Init()?" ); AK_PLUGIN_FREE( m_pAllocator, in_pAddress ); }
99 template <
class USER_DATA>
100 class AkMixerInputMap :
public AkArray<AkInputMapSlot<USER_DATA>, const AkInputMapSlot<USER_DATA>&, AkPluginArrayAllocator, 1>
117 return (*it).pUserData;
124 if ( pSlot->pUserData )
126 pSlot->pContext = in_pInput;
127 return pSlot->pUserData;
139 if ( it != BaseClass::End() )
141 AKASSERT( (*it).pUserData );
143 BaseClass::EraseSwap( it );
152 if ( BaseClass::m_pItems )
156 BaseClass::m_pItems = 0;
157 BaseClass::m_ulReserved = 0;
166 return BaseClass::FindEx( mapSlot );
174 AKASSERT( (*it).pUserData );
176 (*it).~AkInputMapSlot();
178 BaseClass::m_uLength = 0;
182 #endif // _AK_MIXERINPUTMAP_H_
AkForceInline void * Alloc(size_t in_uSize)
AkForceInline AK::IAkPluginMemAlloc * GetAllocator()
Interface to retrieve information about an input of a mixer.
Specific implementation of array.
AkForceInline void * ReAlloc(void *in_pCurrent, size_t in_uOldSize, size_t in_uNewSize)
AkForceInline void Init(AK::IAkPluginMemAlloc *in_pAllocator)
void RemoveLast()
Removes the last item from the array.
AkForceInline void AkMemCpy(void *pDest, const void *pSrc, AkUInt32 uSize)
Platform Independent Helper.
Iterator End() const
Returns the iterator to the end of the array.
AkForceInline AkPluginArrayAllocator()
AkForceInline AkInputMapSlot< USER_DATA > * AddLast()
AkForceInline void Free(void *in_pAddress)
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