[PD-cvs] SF.net SVN: pure-data:[10532] trunk/externals/iem/iem_bin_ambi/src
zmoelnig at users.sourceforge.net
zmoelnig at users.sourceforge.net
Tue Jan 13 18:13:31 CET 2009
Revision: 10532
http://pure-data.svn.sourceforge.net/pure-data/?rev=10532&view=rev
Author: zmoelnig
Date: 2009-01-13 17:13:31 +0000 (Tue, 13 Jan 2009)
Log Message:
-----------
start for 64bit; broken for now..
Modified Paths:
--------------
trunk/externals/iem/iem_bin_ambi/src/bin_ambi_calc_HRTF.c
trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode.c
trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode2.c
trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fft.c
trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fft2.c
trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fir.c
trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fir2.c
trunk/externals/iem/iem_bin_ambi/src/iemlib.h
Modified: trunk/externals/iem/iem_bin_ambi/src/bin_ambi_calc_HRTF.c
===================================================================
--- trunk/externals/iem/iem_bin_ambi/src/bin_ambi_calc_HRTF.c 2009-01-13 17:03:08 UTC (rev 10531)
+++ trunk/externals/iem/iem_bin_ambi/src/bin_ambi_calc_HRTF.c 2009-01-13 17:13:31 UTC (rev 10532)
@@ -233,7 +233,7 @@
{
if (!(a = (t_garray *)pd_findbyclass(x->x_s_fade_out_hrir, garray_class)))
error("%s: no such array", x->x_s_fade_out_hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &fadevec))
+ else if (!iemarray_getarray(a, &npoints, &fadevec))
error("%s: bad template for bin_ambi_calc_HRTF", x->x_s_fade_out_hrir->s_name);
else if (npoints < x->x_fftsize)
error("%s: bad array-size: %d", x->x_s_fade_out_hrir->s_name, npoints);
@@ -301,19 +301,19 @@
if (!(a = (t_garray *)pd_findbyclass(hrtf_re, garray_class)))
error("%s: no such array", hrtf_re->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrtf_re))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrtf_re))
error("%s: bad template for bin_ambi_calc_HRTF", hrtf_re->s_name);
else if (npoints < fftsize)
error("%s: bad array-size: %d", hrtf_re->s_name, npoints);
else if (!(a = (t_garray *)pd_findbyclass(hrtf_im, garray_class)))
error("%s: no such array", hrtf_im->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrtf_im))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrtf_im))
error("%s: bad template for bin_ambi_calc_HRTF", hrtf_im->s_name);
else if (npoints < fftsize)
error("%s: bad array-size: %d", hrtf_im->s_name, npoints);
else if (!(a = (t_garray *)pd_findbyclass(hrir, garray_class)))
error("%s: no such array", hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrir))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrir))
error("%s: bad template for bin_ambi_calc_HRTF", hrir->s_name);
else
{
Modified: trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode.c
===================================================================
--- trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode.c 2009-01-13 17:03:08 UTC (rev 10531)
+++ trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode.c 2009-01-13 17:13:31 UTC (rev 10532)
@@ -644,7 +644,7 @@
{
if (!(a = (t_garray *)pd_findbyclass(x->x_s_fade_out_hrir, garray_class)))
error("%s: no such array", x->x_s_fade_out_hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &fadevec))
+ else if (!iemarray_getarray(a, &npoints, &fadevec))
error("%s: bad template for bin_ambi_reduced_decode", x->x_s_fade_out_hrir->s_name);
else if (npoints < x->x_fftsize)
error("%s: bad array-size: %d", x->x_s_fade_out_hrir->s_name, npoints);
@@ -714,19 +714,19 @@
if (!(a = (t_garray *)pd_findbyclass(hrtf_re, garray_class)))
error("%s: no such array", hrtf_re->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrtf_re))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrtf_re))
error("%s: bad template for bin_ambi_reduced_decode", hrtf_re->s_name);
else if (npoints < fftsize)
error("%s: bad array-size: %d", hrtf_re->s_name, npoints);
else if (!(a = (t_garray *)pd_findbyclass(hrtf_im, garray_class)))
error("%s: no such array", hrtf_im->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrtf_im))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrtf_im))
error("%s: bad template for bin_ambi_reduced_decode", hrtf_im->s_name);
else if (npoints < fftsize)
error("%s: bad array-size: %d", hrtf_im->s_name, npoints);
else if (!(a = (t_garray *)pd_findbyclass(hrir, garray_class)))
error("%s: no such array", hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrir))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrir))
error("%s: bad template for bin_ambi_reduced_decode", hrir->s_name);
else
{
Modified: trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode2.c
===================================================================
--- trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode2.c 2009-01-13 17:03:08 UTC (rev 10531)
+++ trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode2.c 2009-01-13 17:13:31 UTC (rev 10532)
@@ -670,7 +670,7 @@
{
if (!(a = (t_garray *)pd_findbyclass(x->x_s_fade_out_hrir, garray_class)))
error("%s: no such array", x->x_s_fade_out_hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &fadevec))
+ else if (!iemarray_getarray(a, &npoints, &fadevec))
error("%s: bad template for bin_ambi_reduced_decode2", x->x_s_fade_out_hrir->s_name);
else if (npoints < x->x_fftsize)
error("%s: bad array-size: %d", x->x_s_fade_out_hrir->s_name, npoints);
@@ -739,7 +739,7 @@
hrir = x->x_s_hrir[index];
if (!(a = (t_garray *)pd_findbyclass(hrir, garray_class)))
error("%s: no such array", hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrir))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrir))
error("%s: bad template for bin_ambi_reduced_decode2", hrir->s_name);
else
{
@@ -793,13 +793,13 @@
if (!(a = (t_garray *)pd_findbyclass(hrtf_re, garray_class)))
error("%s: no such array", hrtf_re->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrtf_re))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrtf_re))
error("%s: bad template for bin_ambi_reduced_decode2", hrtf_re->s_name);
else if (npoints < fftsize)
error("%s: bad array-size: %d", hrtf_re->s_name, npoints);
else if (!(a = (t_garray *)pd_findbyclass(hrtf_im, garray_class)))
error("%s: no such array", hrtf_im->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrtf_im))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrtf_im))
error("%s: bad template for bin_ambi_reduced_decode2", hrtf_im->s_name);
else if (npoints < fftsize)
error("%s: bad array-size: %d", hrtf_im->s_name, npoints);
Modified: trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fft.c
===================================================================
--- trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fft.c 2009-01-13 17:03:08 UTC (rev 10531)
+++ trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fft.c 2009-01-13 17:13:31 UTC (rev 10532)
@@ -794,7 +794,7 @@
{
if (!(a = (t_garray *)pd_findbyclass(x->x_s_fade_out_hrir, garray_class)))
error("%s: no such array", x->x_s_fade_out_hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &fadevec))
+ else if (!iemarray_getarray(a, &npoints, &fadevec))
error("%s: bad template for bin_ambi_reduced_decode_fft", x->x_s_fade_out_hrir->s_name);
else if (npoints < x->x_fftsize)
error("%s: bad array-size: %d", x->x_s_fade_out_hrir->s_name, npoints);
@@ -864,7 +864,7 @@
hrir = x->x_s_hrir[index];
if (!(a = (t_garray *)pd_findbyclass(hrir, garray_class)))
error("%s: no such array", hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrir))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrir))
error("%s: bad template for bin_ambi_reduced_decode_fft", hrir->s_name);
else
{
@@ -918,13 +918,13 @@
if (!(a = (t_garray *)pd_findbyclass(hrtf_re, garray_class)))
error("%s: no such array", hrtf_re->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrtf_re))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrtf_re))
error("%s: bad template for bin_ambi_reduced_decode_fft", hrtf_re->s_name);
else if (npoints < fftsize)
error("%s: bad array-size: %d", hrtf_re->s_name, npoints);
else if (!(a = (t_garray *)pd_findbyclass(hrtf_im, garray_class)))
error("%s: no such array", hrtf_im->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrtf_im))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrtf_im))
error("%s: bad template for bin_ambi_reduced_decode_fft", hrtf_im->s_name);
else if (npoints < fftsize)
error("%s: bad array-size: %d", hrtf_im->s_name, npoints);
Modified: trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fft2.c
===================================================================
--- trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fft2.c 2009-01-13 17:03:08 UTC (rev 10531)
+++ trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fft2.c 2009-01-13 17:13:31 UTC (rev 10532)
@@ -654,7 +654,7 @@
{
if (!(a = (t_garray *)pd_findbyclass(x->x_s_fade_out_hrir, garray_class)))
error("%s: no such array", x->x_s_fade_out_hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &fadevec))
+ else if (!iemarray_getarray(a, &npoints, &fadevec))
error("%s: bad template for bin_ambi_reduced_decode_fft2", x->x_s_fade_out_hrir->s_name);
else if (npoints < x->x_fftsize)
error("%s: bad array-size: %d", x->x_s_fade_out_hrir->s_name, npoints);
@@ -756,7 +756,7 @@
hrir = x->x_s_hrir[index];
if (!(a = (t_garray *)pd_findbyclass(hrir, garray_class)))
error("%s: no such array", hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrir))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrir))
error("%s: bad template for bin_ambi_reduced_decode_fft2", hrir->s_name);
else
{
@@ -810,13 +810,13 @@
if (!(a = (t_garray *)pd_findbyclass(hrtf_re, garray_class)))
error("%s: no such array", hrtf_re->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrtf_re))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrtf_re))
error("%s: bad template for bin_ambi_reduced_decode_fft2", hrtf_re->s_name);
else if (npoints < fftsize)
error("%s: bad array-size: %d", hrtf_re->s_name, npoints);
else if (!(a = (t_garray *)pd_findbyclass(hrtf_im, garray_class)))
error("%s: no such array", hrtf_im->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrtf_im))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrtf_im))
error("%s: bad template for bin_ambi_reduced_decode_fft2", hrtf_im->s_name);
else if (npoints < fftsize)
error("%s: bad array-size: %d", hrtf_im->s_name, npoints);
Modified: trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fir.c
===================================================================
--- trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fir.c 2009-01-13 17:03:08 UTC (rev 10531)
+++ trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fir.c 2009-01-13 17:13:31 UTC (rev 10532)
@@ -768,13 +768,13 @@
{
t_garray *a;
int npoints;
- t_float *fadevec;
+ iemarray_t *fadevec;
if((int)(x->x_beg_fade_out_hrir) == 0)
{
if (!(a = (t_garray *)pd_findbyclass(x->x_s_fade_out_hrir, garray_class)))
error("%s: no such array", x->x_s_fade_out_hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &fadevec))
+ else if (!iemarray_getarray(a, &npoints, &fadevec))
error("%s: bad template for bin_ambi_reduced_decode_fir", x->x_s_fade_out_hrir->s_name);
else if (npoints < x->x_firsize)
error("%s: bad array-size: %d", x->x_s_fade_out_hrir->s_name, npoints);
@@ -833,7 +833,8 @@
t_garray *a;
int npoints;
t_symbol *hrir;
- t_float *vec_hrir, *vec, *vec_fade_out_hrir;
+ iemarray_t *vec_hrir;
+ t_float *vec, *vec_fade_out_hrir;
float decr, sum;
if(index < 0)
@@ -844,7 +845,7 @@
hrir = x->x_s_hrir[index];
if (!(a = (t_garray *)pd_findbyclass(hrir, garray_class)))
error("%s: no such array", hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrir))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrir))
error("%s: bad template for bin_ambi_reduced_decode_fir", hrir->s_name);
else
{
@@ -885,7 +886,7 @@
t_garray *a;
int npoints;
int firsize = x->x_firsize;
- t_float *vec_hrir_red;
+ iemarray_t *vec_hrir_red;
t_symbol *hrir_red;
if(index < 0)
@@ -897,7 +898,7 @@
if (!(a = (t_garray *)pd_findbyclass(hrir_red, garray_class)))
error("%s: no such array", hrir_red->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrir_red))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrir_red))
error("%s: bad template for bin_ambi_reduced_decode_fir", hrir_red->s_name);
else if (npoints < firsize)
error("%s: bad array-size: %d", hrir_red->s_name, npoints);
Modified: trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fir2.c
===================================================================
--- trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fir2.c 2009-01-13 17:03:08 UTC (rev 10531)
+++ trunk/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode_fir2.c 2009-01-13 17:13:31 UTC (rev 10532)
@@ -633,7 +633,7 @@
{
if (!(a = (t_garray *)pd_findbyclass(x->x_s_fade_out_hrir, garray_class)))
error("%s: no such array", x->x_s_fade_out_hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &fadevec))
+ else if (!iemarray_getarray(a, &npoints, &fadevec))
error("%s: bad template for bin_ambi_reduced_decode_fir2", x->x_s_fade_out_hrir->s_name);
else if (npoints < x->x_firsize)
error("%s: bad array-size: %d", x->x_s_fade_out_hrir->s_name, npoints);
@@ -734,7 +734,7 @@
hrir = x->x_s_hrir[index];
if (!(a = (t_garray *)pd_findbyclass(hrir, garray_class)))
error("%s: no such array", hrir->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrir))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrir))
error("%s: bad template for bin_ambi_reduced_decode_fir2", hrir->s_name);
else
{
@@ -787,7 +787,7 @@
if (!(a = (t_garray *)pd_findbyclass(hrir_red, garray_class)))
error("%s: no such array", hrir_red->s_name);
- else if (!garray_getfloatarray(a, &npoints, &vec_hrir_red))
+ else if (!iemarray_getarray(a, &npoints, &vec_hrir_red))
error("%s: bad template for bin_ambi_reduced_decode_fir2", hrir_red->s_name);
else if (npoints < firsize)
error("%s: bad array-size: %d", hrir_red->s_name, npoints);
Modified: trunk/externals/iem/iem_bin_ambi/src/iemlib.h
===================================================================
--- trunk/externals/iem/iem_bin_ambi/src/iemlib.h 2009-01-13 17:03:08 UTC (rev 10531)
+++ trunk/externals/iem/iem_bin_ambi/src/iemlib.h 2009-01-13 17:13:31 UTC (rev 10532)
@@ -99,4 +99,16 @@
#endif
+
+/* on 64bit systems we cannot use garray_getfloatarray... */
+#if (defined __x86_64__)
+# define iemarray_t t_word
+# define iemarray_getarray garray_getfloatwords
+# define iemarray_getfloat(pointer, index) (pointer[index].w_float)
+#else
+# define iemarray_t t_float
+# define iemarray_getarray garray_getfloatarray
+# define iemarray_getfloat(pointer, index) (pointer[index])
#endif
+
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Pd-cvs
mailing list