ref: a5652e854199c29a6c06493515d20b0cb939a173
parent: af75f07ccc9813ad19ba5b9a7f488c07834f7e9c
author: Chris Moeller <[email protected]>
date: Fri Oct 4 06:12:17 EDT 2013
Renamed init_cubic function in preparation to make it public
--- a/dumb/src/helpers/resamp3.inc
+++ b/dumb/src/helpers/resamp3.inc
@@ -65,7 +65,7 @@
if (VOLUMES_ARE_ZERO) dst = NULL;
- init_cubic();
+ _dumb_init_cubic();
quality = resampler->quality;
@@ -382,7 +382,7 @@
if (VOLUMES_ARE_ZERO) { MIX_ZEROS(=); return; }
- init_cubic();
+ _dumb_init_cubic();
quality = resampler->quality;
--- a/dumb/src/helpers/resample.c
+++ b/dumb/src/helpers/resample.c
@@ -160,12 +160,11 @@
static short cubicA0[1025], cubicA1[1025];
-/*static*/ void init_cubic(void)
+void _dumb_init_cubic(void)
{
unsigned int t; /* 3*1024*1024*1024 is within range if it's unsigned */
static int done = 0;
if (done) return;
- done = 1;
for (t = 0; t < 1025; t++) {
/* int casts to pacify warnings about negating unsigned values */
cubicA0[t] = -(int)( t*t*t >> 17) + (int)( t*t >> 6) - (int)(t << 3);
@@ -173,6 +172,8 @@
}
lanczos_init();
+
+ done = 1;
}