MPD 0.17~git
Data Structures | Functions
src/pcm_convert.h File Reference
#include "pcm_resample.h"
#include "pcm_dither.h"
#include "pcm_buffer.h"

Go to the source code of this file.

Data Structures

struct  pcm_convert_state
 This object is statically allocated (within another struct), and holds buffer allocations and the state for all kinds of PCM conversions. More...

Functions

static GQuark pcm_convert_quark (void)
void pcm_convert_init (struct pcm_convert_state *state)
 Initializes a pcm_convert_state object.
void pcm_convert_deinit (struct pcm_convert_state *state)
 Deinitializes a pcm_convert_state object and frees allocated memory.
const void * pcm_convert (struct pcm_convert_state *state, const struct audio_format *src_format, const void *src, size_t src_size, const struct audio_format *dest_format, size_t *dest_size_r, GError **error_r)
 Converts PCM data between two audio formats.

Function Documentation

const void* pcm_convert ( struct pcm_convert_state state,
const struct audio_format src_format,
const void *  src,
size_t  src_size,
const struct audio_format dest_format,
size_t *  dest_size_r,
GError **  error_r 
)

Converts PCM data between two audio formats.

Parameters:
statean initialized pcm_convert_state object
src_formatthe source audio format
srcthe source PCM buffer
src_sizethe size of #src in bytes
dest_formatthe requested destination audio format
dest_size_rreturns the number of bytes of the destination buffer
error_rlocation to store the error occurring, or NULL to ignore errors
Returns:
the destination buffer, or NULL on error
void pcm_convert_deinit ( struct pcm_convert_state state)

Deinitializes a pcm_convert_state object and frees allocated memory.

void pcm_convert_init ( struct pcm_convert_state state)

Initializes a pcm_convert_state object.

static GQuark pcm_convert_quark ( void  ) [inline, static]

Definition at line 53 of file pcm_convert.h.