MPD 0.17~git
Functions
src/pcm_channels.h File Reference
#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Functions

const int16_t * pcm_convert_channels_16 (struct pcm_buffer *buffer, unsigned dest_channels, unsigned src_channels, const int16_t *src, size_t src_size, size_t *dest_size_r)
 Changes the number of channels in 16 bit PCM data.
const int32_t * pcm_convert_channels_24 (struct pcm_buffer *buffer, unsigned dest_channels, unsigned src_channels, const int32_t *src, size_t src_size, size_t *dest_size_r)
 Changes the number of channels in 24 bit PCM data (aligned at 32 bit boundaries).
const int32_t * pcm_convert_channels_32 (struct pcm_buffer *buffer, unsigned dest_channels, unsigned src_channels, const int32_t *src, size_t src_size, size_t *dest_size_r)
 Changes the number of channels in 32 bit PCM data.

Function Documentation

const int16_t* pcm_convert_channels_16 ( struct pcm_buffer buffer,
unsigned  dest_channels,
unsigned  src_channels,
const int16_t *  src,
size_t  src_size,
size_t *  dest_size_r 
)

Changes the number of channels in 16 bit PCM data.

Parameters:
bufferthe destination pcm_buffer object
dest_channelsthe number of channels requested
src_channelsthe number of channels in the source buffer
srcthe source PCM buffer
src_sizethe number of bytes in #src
dest_size_rreturns the number of bytes of the destination buffer
Returns:
the destination buffer
const int32_t* pcm_convert_channels_24 ( struct pcm_buffer buffer,
unsigned  dest_channels,
unsigned  src_channels,
const int32_t *  src,
size_t  src_size,
size_t *  dest_size_r 
)

Changes the number of channels in 24 bit PCM data (aligned at 32 bit boundaries).

Parameters:
bufferthe destination pcm_buffer object
dest_channelsthe number of channels requested
src_channelsthe number of channels in the source buffer
srcthe source PCM buffer
src_sizethe number of bytes in #src
dest_size_rreturns the number of bytes of the destination buffer
Returns:
the destination buffer
const int32_t* pcm_convert_channels_32 ( struct pcm_buffer buffer,
unsigned  dest_channels,
unsigned  src_channels,
const int32_t *  src,
size_t  src_size,
size_t *  dest_size_r 
)

Changes the number of channels in 32 bit PCM data.

Parameters:
bufferthe destination pcm_buffer object
dest_channelsthe number of channels requested
src_channelsthe number of channels in the source buffer
srcthe source PCM buffer
src_sizethe number of bytes in #src
dest_size_rreturns the number of bytes of the destination buffer
Returns:
the destination buffer