![]() |
nRF Connect SDK API 3.4.99
|
| int pcm_mix | ( | void *const | pcm_a, |
| size_t | size_a, | ||
| void const *const | pcm_b, | ||
| size_t | size_b, | ||
| enum pcm_mix_mode | mix_mode ) |
#include <pcm_mix.h>
Mixes two buffers of PCM data.
| pcm_a | [in/out] Pointer to the PCM data buffer A. |
| size_a | [in] Size of the PCM data buffer A (in bytes). |
| pcm_b | [in] Pointer to the PCM data buffer B. |
| size_b | [in] Size of the PCM data buffer B (in bytes). |
| mix_mode | [in] Mixing mode according to pcm_mix_mode. |
| 0 | Success. Result stored in pcm_a. |
| -EINVAL | pcm_a is NULL or size_a = 0. |
| -EPERM | Either size_b < size_a (for stereo to stereo, mono to mono) or size_a/2 < size_b (for mono to stereo mix). |
| -ESRCH | Invalid mixing mode. |