You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2KB

  1. /*
  2. ** Copyright (c) 2002-2016, Erik de Castro Lopo <erikd@mega-nerd.com>
  3. ** All rights reserved.
  4. **
  5. ** This code is released under 2-clause BSD license. Please see the
  6. ** file at : https://github.com/erikd/libsamplerate/blob/master/COPYING
  7. */
  8. #define ABS(a) (((a) < 0) ? - (a) : (a))
  9. #define MIN(a,b) (((a) < (b)) ? (a) : (b))
  10. #define MAX(a,b) (((a) >= (b)) ? (a) : (b))
  11. #define ARRAY_LEN(x) ((int) (sizeof (x) / sizeof ((x) [0])))
  12. void gen_windowed_sines (int freq_count, const double *freqs, double max, float *output, int output_len) ;
  13. void save_oct_float (char *filename, float *input, int in_len, float *output, int out_len) ;
  14. void save_oct_double (char *filename, double *input, int in_len, double *output, int out_len) ;
  15. void interleave_data (const float *in, float *out, int frames, int channels) ;
  16. void deinterleave_data (const float *in, float *out, int frames, int channels) ;
  17. void reverse_data (float *data, int datalen) ;
  18. double calculate_snr (float *data, int len, int expected_peaks) ;
  19. const char * get_cpu_name (void) ;
  20. #if OS_IS_WIN32
  21. /*
  22. ** Extra Win32 hacks.
  23. **
  24. ** Despite Microsoft claim of windows being POSIX compatibile it has '_sleep'
  25. ** instead of 'sleep'.
  26. */
  27. #define sleep _sleep
  28. #endif