1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-22 14:32:58 +02:00

Upgrade to libsoxr 0.0.2.

This commit is contained in:
v.audacity
2012-10-12 23:54:03 +00:00
parent 3cb679ccd8
commit 2416f94980
51 changed files with 1300 additions and 372 deletions

View File

@@ -0,0 +1,43 @@
/* SoX Resampler Library Copyright (c) 2007-12 robs@users.sourceforge.net
* Licence for this file: LGPL v2.1 See LICENCE for details. */
/* Common includes etc. for the examples. */
#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <math.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
/* Work-around for broken file-I/O on MS-Windows: */
#include <io.h>
#include <fcntl.h>
#define USE_STD_STDIO _setmode(_fileno(stdout), _O_BINARY), \
_setmode(_fileno(stdin ), _O_BINARY);
/* Sometimes missing, so ensure that it is defined: */
#undef M_PI
#define M_PI 3.14159265358979323846
#else
#define USE_STD_STDIO
#endif
#undef int16_t
#define int16_t short
#undef int32_t
#if LONG_MAX > 2147483647L
#define int32_t int
#elif LONG_MAX < 2147483647L
#error this programme requires that 'long int' has at least 32-bits
#else
#define int32_t long
#endif
#undef min
#define min(x,y) ((x)<(y)?(x):(y))
#define AL(a) (sizeof(a)/sizeof((a)[0])) /* Array Length */