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

◆ pscm_copy_pad()

int pscm_copy_pad ( void const *const input,
size_t input_size,
uint8_t pcm_bit_depth,
void * output,
size_t * output_size )

#include <include/pcm_stream_channel_modifier.h>

Adds a copy of every sample from *input and writes it to both channels in *output.

Note
Use to create stereo stream from a mono source where both channels are identical.
Parameters
[in]inputPointer to the input buffer.
[in]input_sizeNumber of bytes in input.
[in]pcm_bit_depthBit depth of PCM samples (16, 24, or 32).
[out]outputPointer to the output buffer.
[out]output_sizeNumber of bytes written to output.
Returns
0 if success.