NW4F Snd
Loading...
Searching...
No Matches
snd_StreamBufferPool.h
Go to the documentation of this file.
1#ifndef NW_SND_STREAM_BUFFER_POOL_H_
2#define NW_SND_STREAM_BUFFER_POOL_H_
3
4#include <nw/snd/snd_Global.h>
5
6namespace nw { namespace snd { namespace internal { namespace driver {
7
9{
10public:
11 void Initialize(void* pBuffer, size_t size, int blockCount);
12 void Finalize();
13
14 void* Alloc();
15 void Free(void* pPtr);
16
17 size_t GetBlockSize() const { return m_BlockSize; }
18#ifdef NW_PLATFORM_CAFE
19 const void* GetBufferAddr() { return m_pBuffer; }
20#endif
21
22private:
23 static const int BLOCK_MAX = 32;
24 static const int BIT_PER_BYTE = 8;
25
26 void* m_pBuffer;
32};
33static_assert(sizeof(StreamBufferPool) == 0x18);
34
35} } } } // namespace nw::snd::internal::driver
36
37#endif // NW_SND_STREAM_BUFFER_POOL_H_
Definition snd_StreamBufferPool.h:9
size_t m_BlockSize
Definition snd_StreamBufferPool.h:28
size_t m_BufferSize
Definition snd_StreamBufferPool.h:27
static const int BLOCK_MAX
Definition snd_StreamBufferPool.h:23
int m_AllocCount
Definition snd_StreamBufferPool.h:30
size_t GetBlockSize() const
Definition snd_StreamBufferPool.h:17
int m_BlockCount
Definition snd_StreamBufferPool.h:29
void * m_pBuffer
Definition snd_StreamBufferPool.h:26
u8 m_AllocFlags[BLOCK_MAX/BIT_PER_BYTE]
Definition snd_StreamBufferPool.h:31
void Initialize(void *pBuffer, size_t size, int blockCount)
static const int BIT_PER_BYTE
Definition snd_StreamBufferPool.h:24
Definition snd_BasicSound.h:136
Definition snd_BasicSound.cpp:3
Definition snd_BasicSound.cpp:3