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

◆ pscm_two_channel_split()

int pscm_two_channel_split ( void const *const  input,
size_t  input_size,
uint8_t  pcm_bit_depth,
void *  output_left,
void *  output_right,
size_t *  output_size 
)

#include <include/pcm_stream_channel_modifier.h>

Splits a stereo stream to two separate mono streams.

Note
Use to split stereo audio stream to two separate channels.
Parameters
[in]inputPointer to the input buffer.
[in]input_sizeNumber of bytes in input. Must be divisible by two.
[in]pcm_bit_depthBit depth of PCM samples (16, 24, or 32).
[out]output_leftPointer to the output buffer containing the left channel.
[out]output_rightPointer to the output buffer containing the right channel.
[out]output_sizeNumber of bytes written to the output, same for both channels.
Returns
0 if success.