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

◆ pscm_zero_pad()

int pscm_zero_pad ( void const *const input,
size_t input_size,
enum audio_channel channel,
uint8_t pcm_bit_depth,
void * output,
size_t * output_size )

#include <include/pcm_stream_channel_modifier.h>

Adds a 0 after every sample from *input and writes it to *output.

Note
Use to create stereo stream from a mono source where one channel is silent.
Parameters
[in]inputPointer to the input buffer.
[in]input_sizeNumber of bytes in input.
[in]channelChannel to contain the audio data.
[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 the output.
Returns
0 if success.