1
0

pcm.h 1.1 KB

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #pragma once
  3. #include <bfc/platform/types.h>
  4. #include <bfc/platform/export.h>
  5. #include <stdint.h>
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #ifdef NSUTIL_EXPORTS
  10. #define NSUTIL_EXPORT __declspec(dllexport)
  11. #else
  12. #define NSUTIL_EXPORT __declspec(dllimport)
  13. #endif
  14. // this function is for when input buffer is in range from -1.0 to 1.0
  15. NSUTIL_EXPORT int nsutil_pcm_FloatToInt_Interleaved_Gain(void *pcm, const float *input, int bps, size_t num_samples, float gain);
  16. NSUTIL_EXPORT int nsutil_pcm_FloatToInt_Interleaved(void *pcm, const float *input, int bps, size_t num_samples);
  17. NSUTIL_EXPORT int nsutil_pcm_IntToFloat_Interleaved(float *output, const void *pcm, int bps, size_t num_samples);
  18. NSUTIL_EXPORT int nsutil_pcm_IntToFloat_Interleaved_Gain(float *output, const void *pcm, int bps, size_t num_samples, float gain);
  19. NSUTIL_EXPORT int nsutil_pcm_S8ToS16_Interleaved(int16_t *output, const int8_t *pcm, size_t num_samples);
  20. NSUTIL_EXPORT int nsutil_pcm_U8ToS16_Interleaved(int16_t *output, const uint8_t *pcm, size_t num_samples);
  21. #ifdef __cplusplus
  22. }
  23. #endif