[PD-cvs] externals/iem/iem_bin_ambi/src bin_ambi_reduced_decode2.c, NONE, 1.1 bin_ambi_reduced_decode_fft.c, NONE, 1.1 bin_ambi_reduced_decode_fft2.c, NONE, 1.1 bin_ambi_reduced_decode_fir.c, NONE, 1.1 bin_ambi_reduced_decode_fir2.c, NONE, 1.1 bin_ambi_calc_HRTF.c, 1.1, 1.2 bin_ambi_reduced_decode.c, 1.1, 1.2 iem_bin_ambi.c, 1.2, 1.3 iem_bin_ambi.h, 1.1, 1.2 iemlib.h, 1.1, 1.2 makefile_win, 1.1, 1.2
musil
tmusil at users.sourceforge.net
Thu Mar 9 16:56:07 CET 2006
Update of /cvsroot/pure-data/externals/iem/iem_bin_ambi/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9954/iem/iem_bin_ambi/src
Modified Files:
bin_ambi_calc_HRTF.c bin_ambi_reduced_decode.c iem_bin_ambi.c
iem_bin_ambi.h iemlib.h makefile_win
Added Files:
bin_ambi_reduced_decode2.c bin_ambi_reduced_decode_fft.c
bin_ambi_reduced_decode_fft2.c bin_ambi_reduced_decode_fir.c
bin_ambi_reduced_decode_fir2.c
Log Message:
update to version JAN_06 with all sources
--- NEW FILE: bin_ambi_reduced_decode_fft2.c ---
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
#ifdef NT
#pragma warning( disable : 4244 )
#pragma warning( disable : 4305 )
#endif
#include "m_pd.h"
#include "iemlib.h"
#include "iem_bin_ambi.h"
#include <math.h>
#include <stdio.h>
#include <string.h>
[...1349 lines suppressed...]
class_addmethod(bin_ambi_reduced_decode_fft2_class, (t_method)bin_ambi_reduced_decode_fft2_sing_range, gensym("sing_range"), A_DEFFLOAT, 0);
class_sethelpsymbol(bin_ambi_reduced_decode_fft2_class, gensym("iemhelp2/help-bin_ambi_reduced_decode_fft2"));
}
/*
Reihenfolge:
n_ls x bin_ambi_reduced_decode_fft2_ls
bin_ambi_reduced_decode_fft2_calc_pinv
n_ls x bin_ambi_reduced_decode_fft2_load_HRIR
n_ls x bin_ambi_reduced_decode_fft2_check_HRIR_arrays
n_ambi x bin_ambi_reduced_decode_fft2_check_HRTF_arrays
n_ambi x bin_ambi_reduced_decode_fft2_calc_reduced
bin_ambi_reduced_decode_fft2_calc_sym
*/
--- NEW FILE: bin_ambi_reduced_decode_fir2.c ---
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
#ifdef NT
#pragma warning( disable : 4244 )
#pragma warning( disable : 4305 )
#endif
#include "m_pd.h"
#include "iemlib.h"
#include "iem_bin_ambi.h"
#include <math.h>
#include <stdio.h>
#include <string.h>
[...1221 lines suppressed...]
class_addmethod(bin_ambi_reduced_decode_fir2_class, (t_method)bin_ambi_reduced_decode_fir2_sing_range, gensym("sing_range"), A_DEFFLOAT, 0);
class_sethelpsymbol(bin_ambi_reduced_decode_fir2_class, gensym("iemhelp2/help-bin_ambi_reduced_decode_fir2"));
}
/*
Reihenfolge:
n_ls x bin_ambi_reduced_decode_fir2_ls
bin_ambi_reduced_decode_fir2_calc_pinv
n_ls x bin_ambi_reduced_decode_fir2_load_HRIR
n_ls x bin_ambi_reduced_decode_fir2_check_HRIR_arrays
n_ambi x bin_ambi_reduced_decode_fir2_check_HRTF_arrays
n_ambi x bin_ambi_reduced_decode_fir2_calc_reduced
bin_ambi_reduced_decode_fir2_calc_sym
*/
Index: iem_bin_ambi.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iem_bin_ambi/src/iem_bin_ambi.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** iem_bin_ambi.c 1 Mar 2006 12:07:33 -0000 1.2
--- iem_bin_ambi.c 9 Mar 2006 15:56:05 -0000 1.3
***************
*** 2,6 ****
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2003 */
#ifdef NT
--- 2,6 ----
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
#ifdef NT
***************
*** 22,32 ****
}
/* ------------------------ setup routine ------------------------- */
- void iem_bin_ambi_sources_setup(void);
void iem_bin_ambi_setup(void)
{
! iem_bin_ambi_sources_setup();
! post("iem_bin_ambi (R-1.15) library loaded!");
}
--- 22,46 ----
}
+ void bin_ambi_calc_HRTF_setup(void);
+ void bin_ambi_reduced_decode_setup(void);
+ void bin_ambi_reduced_decode2_setup(void);
+ void bin_ambi_reduced_decode_fft_setup(void);
+ void bin_ambi_reduced_decode_fir_setup(void);
+ void bin_ambi_reduced_decode_fft2_setup(void);
+ void bin_ambi_reduced_decode_fir2_setup(void);
+
/* ------------------------ setup routine ------------------------- */
void iem_bin_ambi_setup(void)
{
! bin_ambi_calc_HRTF_setup();
! bin_ambi_reduced_decode_setup();
! bin_ambi_reduced_decode2_setup();
! bin_ambi_reduced_decode_fft_setup();
! bin_ambi_reduced_decode_fir_setup();
! bin_ambi_reduced_decode_fft2_setup();
! bin_ambi_reduced_decode_fir2_setup();
! post("iem_bin_ambi (R-1.16) library loaded! (c) Thomas Musil 05.2005");
! post(" musil%ciem.at iem KUG Graz Austria", '@');
}
Index: makefile_win
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iem_bin_ambi/src/makefile_win,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** makefile_win 1 Mar 2006 12:13:45 -0000 1.1
--- makefile_win 9 Mar 2006 15:56:05 -0000 1.2
***************
*** 1,39 ****
!
! all: iem_bin_ambi.dll
!
! VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio\Vc98"
!
! PD_INST_PATH = "C:\Programme\pd"
!
! PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include
!
! PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -DPA_LITTLE_ENDIAN
!
! PD_WIN_L_FLAGS = /nologo
!
! PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NODEFAULTLIB:uuid \
! $(VIS_CPP_PATH)\lib\libc.lib \
! $(VIS_CPP_PATH)\lib\oldnames.lib \
! $(VIS_CPP_PATH)\lib\kernel32.lib \
! $(VIS_CPP_PATH)\lib\wsock32.lib \
! $(VIS_CPP_PATH)\lib\winmm.lib \
! $(PD_INST_PATH)\bin\pthreadVC.lib \
! $(PD_INST_PATH)\bin\pd.lib
!
!
! SRC = bin_ambi_calc_HRTF.c \
! bin_ambi_reduced_decode.c \
! iem_bin_ambi.c
!
!
! OBJ = $(SRC:.c=.obj)
!
! .c.obj:
! cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c
!
! iem_bin_ambi.dll: $(OBJ)
! link $(PD_WIN_L_FLAGS) /dll /export:iem_bin_ambi_setup \
! /out:iem_bin_ambi.dll $(OBJ) $(PD_WIN_LIB)
!
! clean:
! del *.obj
--- 1,43 ----
!
! all: iem_bin_ambi.dll
!
! VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio\Vc98"
!
! PD_INST_PATH = "C:\Programme\pd"
!
! PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include
!
! PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -DPA_LITTLE_ENDIAN
!
! PD_WIN_L_FLAGS = /nologo
!
! PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NODEFAULTLIB:uuid \
! $(VIS_CPP_PATH)\lib\libc.lib \
! $(VIS_CPP_PATH)\lib\oldnames.lib \
! $(VIS_CPP_PATH)\lib\kernel32.lib \
! $(VIS_CPP_PATH)\lib\wsock32.lib \
! $(VIS_CPP_PATH)\lib\winmm.lib \
! $(PD_INST_PATH)\bin\pd.lib
!
!
! SRC = bin_ambi_calc_HRTF.c \
! bin_ambi_reduced_decode.c \
! bin_ambi_reduced_decode2.c \
! bin_ambi_reduced_decode_fft.c \
! bin_ambi_reduced_decode_fir.c \
! bin_ambi_reduced_decode_fft2.c \
! bin_ambi_reduced_decode_fir2.c \
! iem_bin_ambi.c
!
!
! OBJ = $(SRC:.c=.obj)
!
! .c.obj:
! cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c
!
! iem_bin_ambi.dll: $(OBJ)
! link $(PD_WIN_L_FLAGS) /dll /export:iem_bin_ambi_setup \
! /out:iem_bin_ambi.dll $(OBJ) $(PD_WIN_LIB)
!
! clean:
! del *.obj
Index: iem_bin_ambi.h
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iem_bin_ambi/src/iem_bin_ambi.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** iem_bin_ambi.h 1 Mar 2006 11:46:46 -0000 1.1
--- iem_bin_ambi.h 9 Mar 2006 15:56:05 -0000 1.2
***************
*** 2,10 ****
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2003 */
#ifndef __IEMBINAMBI_H__
#define __IEMBINAMBI_H__
typedef struct
{
--- 2,16 ----
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
#ifndef __IEMBINAMBI_H__
#define __IEMBINAMBI_H__
+ #define BIN_AMBI_LS_REAL 0
+ #define BIN_AMBI_LS_IND 0
+ #define BIN_AMBI_LS_MRG 1
+ #define BIN_AMBI_LS_MIR 2
+ #define BIN_AMBI_LS_PHT 3
+
typedef struct
{
--- NEW FILE: bin_ambi_reduced_decode2.c ---
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
#ifdef NT
#pragma warning( disable : 4244 )
#pragma warning( disable : 4305 )
#endif
#include "m_pd.h"
#include "iemlib.h"
#include "iem_bin_ambi.h"
#include <math.h>
#include <stdio.h>
#include <string.h>
[...1321 lines suppressed...]
class_addmethod(bin_ambi_reduced_decode2_class, (t_method)bin_ambi_reduced_decode2_sing_range, gensym("sing_range"), A_DEFFLOAT, 0);
class_sethelpsymbol(bin_ambi_reduced_decode2_class, gensym("iemhelp2/help-bin_ambi_reduced_decode2"));
}
/*
Reihenfolge:
n_ls x bin_ambi_reduced_decode2_ls
bin_ambi_reduced_decode2_calc_pinv
n_ls x bin_ambi_reduced_decode2_load_HRIR
n_ls x bin_ambi_reduced_decode2_check_HRIR_arrays
n_ambi x bin_ambi_reduced_decode2_check_HRTF_arrays
n_ambi x bin_ambi_reduced_decode2_calc_reduced
bin_ambi_reduced_decode2_decoding
*/
Index: bin_ambi_reduced_decode.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iem_bin_ambi/src/bin_ambi_reduced_decode.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** bin_ambi_reduced_decode.c 1 Mar 2006 11:46:46 -0000 1.1
--- bin_ambi_reduced_decode.c 9 Mar 2006 15:56:05 -0000 1.2
***************
*** 2,6 ****
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2003 */
#ifdef NT
--- 2,6 ----
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
#ifdef NT
***************
*** 89,93 ****
f = g * (float)i;
(*sincos).real = cos(f);
! (*sincos).imag = sin(f);/*change*/
sincos++;
}
--- 89,93 ----
f = g * (float)i;
(*sincos).real = cos(f);
! (*sincos).imag = -sin(f);/*FFT*/
sincos++;
}
***************
*** 742,746 ****
if(npoints < fftsize)
{
! post("warning: %s-array-size: %d", hrir->s_name, npoints);
}
vec = x->x_beg_hrir;
--- 742,746 ----
if(npoints < fftsize)
{
! post("bin_ambi_reduced_decode-WARNING: %s-array-size: %d < FFT-size: %d", hrir->s_name, npoints, fftsize);
}
vec = x->x_beg_hrir;
***************
*** 859,872 ****
}
}
!
! vec_hrtf_re[0] = val[0].real;
! vec_hrtf_im[0] = 0.0f;
! for( i = 1; i < fs2; i++ )
{
! vec_hrtf_re[i] = 2.0f*val[i].real;
! vec_hrtf_im[i] = 2.0f*val[i].imag;
}
! vec_hrtf_re[fs2] = 0.0f;
vec_hrtf_im[fs2] = 0.0f;
}
--- 859,874 ----
}
}
! for(i = 0; i<fs2; i++)
{
! vec_hrtf_re[i] = val[i].real;
! vec_hrtf_im[i] = val[i].imag;
}
! vec_hrtf_re[fs2] = val[fs2].real;
vec_hrtf_im[fs2] = 0.0f;
+ for(i = fs2+1; i < fftsize; i++)
+ {
+ vec_hrtf_re[i] = 0.0f;
+ vec_hrtf_im[i] = 0.0f;
+ }
}
***************
*** 1032,1036 ****
}
else
! post("bin_ambi_reduced_decode-ERROR: ambi_weight needs %d float weights", x->x_n_order);
}
--- 1034,1038 ----
}
else
! post("bin_ambi_reduced_decode-ERROR: ambi_weight needs %d float weights", x->x_n_order+1);
}
***************
*** 1082,1091 ****
t_bin_ambi_reduced_decode *x = (t_bin_ambi_reduced_decode *)pd_new(bin_ambi_reduced_decode_class);
char buf[400];
! int i, j, fftok;
! int n_order, n_dim, n_ambi, fftsize, prefix;
! t_symbol *s_hrir;
! t_symbol *s_hrtf_re;
! t_symbol *s_hrtf_im;
! t_symbol *s_fade_out_hrir;
if((argc >= 8) &&
--- 1084,1093 ----
t_bin_ambi_reduced_decode *x = (t_bin_ambi_reduced_decode *)pd_new(bin_ambi_reduced_decode_class);
char buf[400];
! int i, j, fftok, ok=0;
! int n_order=0, n_dim=0, n_ambi=0, fftsize=0, prefix=0;
! t_symbol *s_hrir=gensym("L_HRIR");
! t_symbol *s_hrtf_re=gensym("HRTF_re");
! t_symbol *s_hrtf_im=gensym("HRTF_im");
! t_symbol *s_fade_out_hrir=gensym("HRIR_win");
if((argc >= 8) &&
***************
*** 1110,1113 ****
--- 1112,1143 ----
fftsize = (int)atom_getintarg(7, argc, argv);
+ ok = 1;
+ }
+ else if((argc >= 8) &&
+ IS_A_FLOAT(argv,0) &&
+ IS_A_FLOAT(argv,1) &&
+ IS_A_FLOAT(argv,2) &&
+ IS_A_FLOAT(argv,3) &&
+ IS_A_FLOAT(argv,4) &&
+ IS_A_FLOAT(argv,5) &&
+ IS_A_FLOAT(argv,6) &&
+ IS_A_FLOAT(argv,7))
+ {
+ prefix = (int)atom_getintarg(0, argc, argv);
+
+ s_hrir = gensym("L_HRIR");
+ s_hrtf_re = gensym("HRTF_re");
+ s_hrtf_im = gensym("HRTF_im");
+ s_fade_out_hrir = gensym("HRIR_win");
+
+ n_order = (int)atom_getintarg(5, argc, argv);
+ n_dim = (int)atom_getintarg(6, argc, argv);
+ fftsize = (int)atom_getintarg(7, argc, argv);
+
+ ok = 1;
+ }
+
+ if(ok)
+ {
if(n_order < 1)
n_order = 1;
***************
*** 1142,1146 ****
{
fftsize = 512;
! post("bin_ambi_reduced_decode-ERROR: fftsize not equal to 2 ^ n !!!");
}
--- 1172,1177 ----
{
fftsize = 512;
! post("bin_ambi_reduced_decode-WARNING: fftsize not equal to 2 ^ n !!!");
! post(" fftsize set to %d", fftsize);
}
***************
*** 1212,1217 ****
{
post("bin_ambi_reduced_decode-ERROR: need 1 float + 4 symbols + 3 floats arguments:");
! post(" prefix + hrir_name + hrtf_re_name + hrtf_im_name + hrir_fade_out_name +");
! post(" ambi_order + ambi_dimension + fftsize");
return(0);
}
--- 1243,1248 ----
{
post("bin_ambi_reduced_decode-ERROR: need 1 float + 4 symbols + 3 floats arguments:");
! post(" prefix(unique-number) + hrir_name + hrtf_re_name + hrtf_im_name + hrir_fade_out_name +");
! post(" + ambi_order + ambi_dimension + fftsize");
return(0);
}
Index: iemlib.h
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iem_bin_ambi/src/iemlib.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** iemlib.h 1 Mar 2006 11:46:46 -0000 1.1
--- iemlib.h 9 Mar 2006 15:56:05 -0000 1.2
***************
*** 2,6 ****
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2003 */
#ifndef __IEMLIB_H__
--- 2,6 ----
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iemlib.h written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
#ifndef __IEMLIB_H__
***************
*** 34,52 ****
#define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */
! /* machine-dependent definitions. These ifdefs really
! should have been by CPU type and not by operating system! */
#ifdef IRIX
! /* big-endian. Most significant byte is at low address in memory */
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
#define int32 long /* a data type that has 32 bits */
#else
! #ifdef NT
! /* little-endian; most significant byte is at highest address */
#define HIOFFSET 1
#define LOWOFFSET 0
#define int32 long
#else
! #ifdef __linux__
#include <endian.h>
--- 34,64 ----
#define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */
! /* machine-dependent definitions. These ifdefs really
! should have been by CPU type and not by operating system! */
#ifdef IRIX
! /* big-endian. Most significant byte is at low address in memory */
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
#define int32 long /* a data type that has 32 bits */
#else
! #ifdef MSW
! /* little-endian; most significant byte is at highest address */
#define HIOFFSET 1
#define LOWOFFSET 0
#define int32 long
#else
! #ifdef __FreeBSD__
! #include <machine/endian.h>
! #if BYTE_ORDER == LITTLE_ENDIAN
! #define HIOFFSET 1
! #define LOWOFFSET 0
! #else
! #define HIOFFSET 0 /* word offset to find MSB */
! #define LOWOFFSET 1 /* word offset to find LSB */
! #endif /* BYTE_ORDER */
! #include <sys/types.h>
! #define int32 int32_t
! #endif
! #ifdef __linux__
#include <endian.h>
***************
*** 55,59 ****
#error No byte order defined
#endif
!
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define HIOFFSET 1
--- 67,71 ----
#error No byte order defined
#endif
!
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define HIOFFSET 1
***************
*** 67,79 ****
#define int32 int32_t
#endif /* __linux__ */
! #endif /* NT */
#endif /* SGI */
union tabfudge
{
! double tf_d;
! int32 tf_i[2];
};
#endif
--- 79,102 ----
#define int32 int32_t
+ #else
+ #ifdef __APPLE__
+ #define HIOFFSET 0 /* word offset to find MSB */
+ #define LOWOFFSET 1 /* word offset to find LSB */
+ #define int32 int /* a data type that has 32 bits */
+
+ #endif /* __APPLE__ */
#endif /* __linux__ */
! #endif /* MSW */
#endif /* SGI */
union tabfudge
{
! double tf_d;
! int32 tf_i[2];
};
+ #define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \
+ (((*(unsigned int*)&(f))&0x60000000)==0x60000000))
+ /* more stringent test: anything not between 1e-19 and 1e19 in absolute val */
+
#endif
--- NEW FILE: bin_ambi_reduced_decode_fir.c ---
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
#ifdef NT
#pragma warning( disable : 4244 )
#pragma warning( disable : 4305 )
#endif
#include "m_pd.h"
#include "iemlib.h"
#include "iem_bin_ambi.h"
#include <math.h>
#include <stdio.h>
#include <string.h>
[...1346 lines suppressed...]
class_addmethod(bin_ambi_reduced_decode_fir_class, (t_method)bin_ambi_reduced_decode_fir_sing_range, gensym("sing_range"), A_DEFFLOAT, 0);
class_sethelpsymbol(bin_ambi_reduced_decode_fir_class, gensym("iemhelp2/help-bin_ambi_reduced_decode_fir"));
}
/*
Reihenfolge:
n_ls x bin_ambi_reduced_decode_fir_ls
bin_ambi_reduced_decode_fir_calc_pinv
n_ls x bin_ambi_reduced_decode_fir_load_HRIR
n_ls x bin_ambi_reduced_decode_fir_check_HRIR_arrays
n_ambi x bin_ambi_reduced_decode_fir_check_HRTF_arrays
n_ambi x bin_ambi_reduced_decode_fir_calc_reduced
bin_ambi_reduced_decode_fir_calc_sym
*/
--- NEW FILE: bin_ambi_reduced_decode_fft.c ---
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
#ifdef NT
#pragma warning( disable : 4244 )
#pragma warning( disable : 4305 )
#endif
#include "m_pd.h"
#include "iemlib.h"
#include "iem_bin_ambi.h"
#include <math.h>
#include <stdio.h>
#include <string.h>
[...1473 lines suppressed...]
class_addmethod(bin_ambi_reduced_decode_fft_class, (t_method)bin_ambi_reduced_decode_fft_sing_range, gensym("sing_range"), A_DEFFLOAT, 0);
class_sethelpsymbol(bin_ambi_reduced_decode_fft_class, gensym("iemhelp2/help-bin_ambi_reduced_decode_fft"));
}
/*
Reihenfolge:
n_ls x bin_ambi_reduced_decode_fft_ls
bin_ambi_reduced_decode_fft_calc_pinv
n_ls x bin_ambi_reduced_decode_fft_load_HRIR
n_ls x bin_ambi_reduced_decode_fft_check_HRIR_arrays
n_ambi x bin_ambi_reduced_decode_fft_check_HRTF_arrays
n_ambi x bin_ambi_reduced_decode_fft_calc_reduced
bin_ambi_reduced_decode_fft_calc_sym
*/
Index: bin_ambi_calc_HRTF.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iem_bin_ambi/src/bin_ambi_calc_HRTF.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** bin_ambi_calc_HRTF.c 1 Mar 2006 11:46:46 -0000 1.1
--- bin_ambi_calc_HRTF.c 9 Mar 2006 15:56:05 -0000 1.2
***************
*** 2,6 ****
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2003 */
#ifdef NT
--- 2,6 ----
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
#ifdef NT
***************
*** 70,74 ****
f = g * (float)i;
(*sincos).real = cos(f);
! (*sincos).imag = sin(f);/*change*/
sincos++;
}
--- 70,74 ----
f = g * (float)i;
(*sincos).real = cos(f);
! (*sincos).imag = -sin(f);/*FFT*/
sincos++;
}
More information about the Pd-cvs
mailing list