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

◆ pscm_one_channel_split()

int pscm_one_channel_split ( 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>

Removes every second sample from *input and writes it to *output.

Note
Use to split stereo audio stream to single channel.
Parameters
[in]inputPointer to the input buffer.
[in]input_sizeNumber of bytes in the input. Must be divisible by two.
[in]channelChannel to keep the audio data from.
[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.