src/pcm_buffer.h File Reference

#include "check.h"
#include <glib.h>
#include <assert.h>

Go to the source code of this file.

Data Structures

struct  pcm_buffer
 Manager for a temporary buffer which grows as needed. More...

Functions

static void pcm_buffer_init (struct pcm_buffer *buffer)
 Initialize the buffer, but don't allocate anything yet.
static void pcm_buffer_deinit (struct pcm_buffer *buffer)
 Free resources.
G_GNUC_MALLOC void * pcm_buffer_get (struct pcm_buffer *buffer, size_t size)
 Get the buffer, and guarantee a minimum size.

Function Documentation

static void pcm_buffer_deinit ( struct pcm_buffer buffer  )  [inline, static]

Free resources.

This function may be called more than once.

Definition at line 56 of file pcm_buffer.h.

G_GNUC_MALLOC void* pcm_buffer_get ( struct pcm_buffer buffer,
size_t  size 
)

Get the buffer, and guarantee a minimum size.

This buffer becomes invalid with the next pcm_buffer_get() call.

This function will never return NULL, even if size is zero, because the PCM library uses the NULL return value to signal "error". An empty destination buffer is not always an error.

static void pcm_buffer_init ( struct pcm_buffer buffer  )  [inline, static]

Initialize the buffer, but don't allocate anything yet.

Definition at line 44 of file pcm_buffer.h.


Generated on 17 Jul 2013 for MPD by  doxygen 1.6.1