MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions
PcmBuffer Class Reference

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)

## Detailed Description

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.

## Member Function Documentation

void PcmBuffer::Clear | ( |  | ) |
| 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.

template<typename T >

gcc_malloc T* PcmBuffer::GetT | ( | size_t | n | ) |
| inline

Definition at line 55 of file PcmBuffer.hxx.

The documentation for this class was generated from the following file:

- pcm/PcmBuffer.hxx