nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
pcm_stream_channel_modifier.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
11#ifndef _PCM_STREAM_CHANNEL_MODIFIER_H_
12#define _PCM_STREAM_CHANNEL_MODIFIER_H_
13
22#include <zephyr/kernel.h>
23#include <audio_defines.h>
24
39int pscm_zero_pad(void const *const input, size_t input_size, enum audio_channel channel,
40 uint8_t pcm_bit_depth, void *output, size_t *output_size);
41
55int pscm_copy_pad(void const *const input, size_t input_size, uint8_t pcm_bit_depth, void *output,
56 size_t *output_size);
57
69int pscm_combine(void const *const input_left, void const *const input_right, size_t input_size,
70 uint8_t pcm_bit_depth, void *output, size_t *output_size);
71
86int pscm_one_channel_split(void const *const input, size_t input_size, enum audio_channel channel,
87 uint8_t pcm_bit_depth, void *output, size_t *output_size);
88
105int pscm_two_channel_split(void const *const input, size_t input_size, uint8_t pcm_bit_depth,
106 void *output_left, void *output_right, size_t *output_size);
107
112#endif /* _PCM_STREAM_CHANNEL_MODIFIER_H_ */
audio_channel
Audio channel assignment values.
Definition: audio_defines.h:20
Globally accessible audio related defines.
int pscm_copy_pad(void const *const input, size_t input_size, uint8_t pcm_bit_depth, void *output, size_t *output_size)
Adds a copy of every sample from *input and writes it to both channels in *output.
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)
Splits a stereo stream to two separate mono streams.
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)
Removes every second sample from *input and writes it to *output.
int pscm_combine(void const *const input_left, void const *const input_right, size_t input_size, uint8_t pcm_bit_depth, void *output, size_t *output_size)
Combines two mono streams into one stereo stream.
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)
Adds a 0 after every sample from *input and writes it to *output.