MPD
0.20.18
|
Manager for a temporary buffer which grows as needed. More...
#include <PcmBuffer.hxx>
Public Member Functions | |
void | Clear () |
gcc_malloc void * | Get (size_t size) |
Get the buffer, and guarantee a minimum size. More... | |
template<typename T > | |
gcc_malloc T * | GetT (size_t n) |
Manager for a temporary buffer which grows as needed.
We could allocate a new buffer every time pcm_convert() is called, but that would put too much stress on the allocator.
Definition at line 33 of file PcmBuffer.hxx.
|
inline |
Definition at line 37 of file PcmBuffer.hxx.
gcc_malloc void* PcmBuffer::Get | ( | size_t | size | ) |
Get the buffer, and guarantee a minimum size.
This buffer becomes invalid with the next Get() call.
This function will never return nullptr, even if size is zero, because the PCM library uses the nullptr return value to signal "error". An empty destination buffer is not always an error.
|
inline |
Definition at line 55 of file PcmBuffer.hxx.