MPD

- Main Page
- Data Structures
- Files

- File List
- Globals

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:

  state | an initialized pcm_convert_state object
  src_format | the source audio format
  src | the source PCM buffer
  src_size | the size of #src in bytes
  dest_format | the requested destination audio format
  dest_size_r | returns the number of bytes of the destination buffer
  error_r | location to store the error occuring, 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.