nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ pscm_interleave()

int pscm_interleave ( void const *const input,
size_t input_size,
uint8_t channel,
uint8_t pcm_bit_depth,
void * output,
size_t output_size,
uint8_t output_channels )

#include <include/pcm_stream_channel_modifier.h>

Interleave a channel into a buffer of N channels of PCM.

Note
: The interleaver can not be executed inplace (i.e. input != output)
Parameters
[in]inputPointer to the channel input buffer. Should be 4-bytes aligned.
[in]input_sizeNumber of bytes in input.
[in]channelChannel to interleave into.
[in]pcm_bit_depthBit depth of PCM samples (8, 16, 24, or 32).
[out]outputPointer to the multi-channel output buffer. Should be 4-bytes aligned.
[in]output_sizeNumber of bytes in output. Must be at least (input_size * output_channels).
[in]output_channelsNumber of channels in the output buffer.
Returns
0 if successful, error value