From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/nsutil/pcm.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Src/nsutil/pcm.h (limited to 'Src/nsutil/pcm.h') diff --git a/Src/nsutil/pcm.h b/Src/nsutil/pcm.h new file mode 100644 index 00000000..b2bb92c9 --- /dev/null +++ b/Src/nsutil/pcm.h @@ -0,0 +1,27 @@ +#pragma once +#pragma once +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef NSUTIL_EXPORTS +#define NSUTIL_EXPORT __declspec(dllexport) +#else +#define NSUTIL_EXPORT __declspec(dllimport) +#endif + + // this function is for when input buffer is in range from -1.0 to 1.0 +NSUTIL_EXPORT int nsutil_pcm_FloatToInt_Interleaved_Gain(void *pcm, const float *input, int bps, size_t num_samples, float gain); +NSUTIL_EXPORT int nsutil_pcm_FloatToInt_Interleaved(void *pcm, const float *input, int bps, size_t num_samples); +NSUTIL_EXPORT int nsutil_pcm_IntToFloat_Interleaved(float *output, const void *pcm, int bps, size_t num_samples); +NSUTIL_EXPORT int nsutil_pcm_IntToFloat_Interleaved_Gain(float *output, const void *pcm, int bps, size_t num_samples, float gain); +NSUTIL_EXPORT int nsutil_pcm_S8ToS16_Interleaved(int16_t *output, const int8_t *pcm, size_t num_samples); +NSUTIL_EXPORT int nsutil_pcm_U8ToS16_Interleaved(int16_t *output, const uint8_t *pcm, size_t num_samples); + +#ifdef __cplusplus +} +#endif \ No newline at end of file -- cgit