MPD
Functions
pcm_byteswap.h File Reference
#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Functions

const int16_t * pcm_byteswap_16 (struct pcm_buffer *buffer, const int16_t *src, size_t len)
 Changes the endianness of 16 bit PCM data.
 
const int32_t * pcm_byteswap_32 (struct pcm_buffer *buffer, const int32_t *src, size_t len)
 Changes the endianness of 32-bit (or 24-bit) PCM data.
 

Function Documentation

const int16_t* pcm_byteswap_16 ( struct pcm_buffer buffer,
const int16_t *  src,
size_t  len 
)

Changes the endianness of 16 bit PCM data.

Parameters
bufferthe destination pcm_buffer object
srcthe source PCM buffer
src_sizethe number of bytes in #src
Returns
the destination buffer
const int32_t* pcm_byteswap_32 ( struct pcm_buffer buffer,
const int32_t *  src,
size_t  len 
)

Changes the endianness of 32-bit (or 24-bit) PCM data.

Parameters
bufferthe destination pcm_buffer object
srcthe source PCM buffer
src_sizethe number of bytes in #src
Returns
the destination buffer