이 파일의 문서화 페이지로 가기
33 template <AkMemID T_MEMID>
38 return AkAlloc(T_MEMID, in_uSize);
43 AkFree(T_MEMID, in_pAddress);
47 template <AkMemID T_MEMID>
57 AkFree(T_MEMID, in_pAddress);
65 template <
class T,
class TAlloc = AkRingBufferAllocatorDefault>
75 , m_nbReadableItems(0)
84 m_nbReadableItems = 0;
86 m_data =
reinterpret_cast<T*
>(TAlloc::Alloc(m_nbItems *
sizeof(T)));
99 m_nbReadableItems = 0;
113 m_nbReadableItems = 0;
125 return &m_data[m_writeIndex];
132 m_writeIndex = (m_writeIndex + nbItems) % m_nbItems;
146 return &m_data[m_readIndex];
153 AkUInt32 uReadIndex = (m_readIndex + uOffset) % m_nbItems;
154 return &m_data[uReadIndex];
161 m_readIndex = (m_readIndex + nbItems) % m_nbItems;
185 AkUInt32 uTargetItems = m_nbItems + in_uGrowBy;
186 if (T* pNewData =
reinterpret_cast<T*
>(TAlloc::Alloc(uTargetItems *
sizeof(T))))
191 if (m_readIndex >= m_writeIndex)
196 memcpy(pNewData, m_data,
sizeof(T) * m_writeIndex);
198 memcpy(pNewData + m_readIndex + in_uGrowBy, m_data + m_readIndex,
sizeof(T) * (m_nbItems - m_readIndex));
199 m_readIndex += in_uGrowBy;
205 memcpy(pNewData + m_readIndex, m_data + m_readIndex,
sizeof(T) * uReadableItems);
211 m_nbItems = uTargetItems;
const T * Peek(AkUInt32 uOffset) const
AkUInt32 GetReadIndex() const
const T * GetReadPtr() const
AkUInt32 GetWriteIndex() const
#define AkFree(_pool, _pvmem)
static AkForceInline void Free(void *in_pAddress)
AKSOUNDENGINE_API void Free(AkMemPoolId in_poolId, void *in_pMemAddress)
static AkForceInline void * Alloc(size_t in_uSize)
AKRESULT
Standard function call result.
AkRingBufferAllocatorAligned< AkMemID_Processing > AkRingBufferAllocatorLEngineAligned
static AkForceInline void * Alloc(size_t in_uSize)
AkRingBufferAllocatorNoAlign< AkMemID_Object > AkRingBufferAllocatorDefault
#define AkAlloc(_pool, _size)
@ AK_Success
The operation was successful.
static AkForceInline void Free(void *in_pAddress)
void IncrementReadIndex(AkUInt32 nbItems)
AkUInt32 GetNbReadableItems() const
AkUInt32 GetNbWritableItems() const
#define AKASSERT(Condition)
AKRESULT Init(AkUInt32 nbItems)
#define AkMalign(_pool, _size, _align)
void IncrementWriteIndex(AkUInt32 nbItems)
uint32_t AkUInt32
Unsigned 32-bit integer
@ AK_InsufficientMemory
Memory error.
bool Grow(AkUInt32 in_uGrowBy)
AkRingBufferAllocatorNoAlign< AkMemID_Processing > AkRingBufferAllocatorLEngine
지원이 필요하신가요?
질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!
지원 페이지를 방문해 주세요
작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.
프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.
Wwise를 시작해 보세요